mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 08:24:32 -08:00
Add/move code into kutil library
This commit is contained in:
13
src/modules/kutil/memory.h
Normal file
13
src/modules/kutil/memory.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
namespace kutil {
|
||||
|
||||
void * memset(void *p, uint8_t v, size_t n);
|
||||
|
||||
template <typename T>
|
||||
T read_from(const void *p) { return *reinterpret_cast<const T *>(p); }
|
||||
|
||||
} // namespace kutil
|
||||
Reference in New Issue
Block a user