C++ bindings now work!
This commit is contained in:
parent
270dc3f1b8
commit
1d6a6d90ab
7 changed files with 195 additions and 86 deletions
|
|
@ -19,6 +19,10 @@
|
|||
#define HAMMER_ALLOCATOR__H__
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// TODO(thequux): Turn this into an "HAllocatorVtable", and add a wrapper that also takes an environment pointer.
|
||||
typedef struct HAllocator_ {
|
||||
void* (*alloc)(struct HAllocator_* allocator, size_t size);
|
||||
|
|
@ -44,5 +48,8 @@ typedef struct {
|
|||
|
||||
void h_allocator_stats(HArena *arena, HArenaStats *stats);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // #ifndef LIB_ALLOCATOR__H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue