mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 08:24:32 -08:00
18 lines
305 B
C++
18 lines
305 B
C++
#pragma once
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
|
|
inline void * operator new (size_t, void *p) throw() { return p; }
|
|
|
|
|
|
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
|