Change to C99 and add weak references
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#if __has_attribute(unused)
|
||||
#if defined(__has_attribute) && __has_attribute(unused)
|
||||
# define UNUSED __attribute__((unused))
|
||||
#else
|
||||
# define UNUSED
|
||||
@ -67,8 +67,8 @@ static UNUSED char *counting_strdup(const char *str) {
|
||||
}
|
||||
|
||||
static UNUSED const RefcountAllocator COUNTING_ALLOCATOR = {
|
||||
.malloc = counting_malloc,
|
||||
.free = counting_free,
|
||||
.malloc.no_data = counting_malloc,
|
||||
.free.no_data = counting_free,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user