diff --git a/src/extra-memory.c b/src/extra-memory.c index 0ff5783..afeeb49 100644 --- a/src/extra-memory.c +++ b/src/extra-memory.c @@ -8,6 +8,7 @@ #undef malloc #undef realloc #undef calloc +#undef free void* libcdsb_aalloc(size_t a, size_t n) { void* x; @@ -73,3 +74,7 @@ char* libcdsb_strndup(const char* s, size_t n) { } abort(); } + +void libcdsb_free(void* s) { + free(s); +} diff --git a/src/extra-stack.c b/src/extra-stack.c index 3a32bdf..f78fdb0 100644 --- a/src/extra-stack.c +++ b/src/extra-stack.c @@ -4,6 +4,7 @@ #include #include "__internal/include.h" #undef malloc +#undef free void libcdsb_stack_init(stack_t* x) { memset(x, 0, sizeof(*x)); diff --git a/src/vtype-extra.c b/src/vtype-extra.c index 244f90b..80f1bfc 100644 --- a/src/vtype-extra.c +++ b/src/vtype-extra.c @@ -26,13 +26,13 @@ static _Thread_local char STRINGIFY_BUFFER[64]; /*#####################################################################################################################*/ -const size_t LIBCDSB_VTYPE_SIZES[18] = { +const size_t LIBCDSB_VTYPE_SIZES[19] = { sizeof(void*), sizeof(bool), sizeof(u8_t), sizeof(u16_t), sizeof(u32_t), sizeof(u64_t), sizeof(s8_t), sizeof(s16_t), sizeof(s32_t), sizeof(s64_t), sizeof(fl_t), sizeof(dbl_t), sizeof(ldbl_t), sizeof(str_t), sizeof(map_t), sizeof(arr_t), - sizeof(list_t), sizeof(set_t) + sizeof(list_t), sizeof(set_t), sizeof(dict_t) };