Derive-C
Loading...
Searching...
No Matches
trait.h File Reference

Go to the source code of this file.

Macros

#define DC_TRAIT_ALLOC(SELF)

Macro Definition Documentation

◆ DC_TRAIT_ALLOC

#define DC_TRAIT_ALLOC ( SELF)
Value:
DC_REQUIRE_METHOD(void*, SELF, malloc, (SELF*, size_t)); \
DC_REQUIRE_METHOD(void, SELF, free, (SELF*, void*)); \
DC_REQUIRE_METHOD(void*, SELF, realloc, (SELF*, void*, size_t)); \
DC_REQUIRE_METHOD(void*, SELF, calloc, (SELF*, size_t, size_t)); \
DC_TRAIT_DEBUGABLE(SELF)
static void free(SELF *self, void *ptr)
Definition template.h:56
static void * realloc(SELF *self, void *ptr, size_t size)
Definition template.h:45
static void * malloc(SELF *self, size_t size)
Definition template.h:23
static void * calloc(SELF *self, size_t count, size_t size)
Definition template.h:34
#define DC_REQUIRE_METHOD(ret, obj, name, args)
Definition require.h:17
#define SELF
Definition def.h:52

Definition at line 5 of file trait.h.

5#define DC_TRAIT_ALLOC(SELF) \
6 DC_REQUIRE_METHOD(void*, SELF, malloc, (SELF*, size_t)); \
7 DC_REQUIRE_METHOD(void, SELF, free, (SELF*, void*)); \
8 DC_REQUIRE_METHOD(void*, SELF, realloc, (SELF*, void*, size_t)); \
9 DC_REQUIRE_METHOD(void*, SELF, calloc, (SELF*, size_t, size_t)); \
10 DC_TRAIT_DEBUGABLE(SELF)