enhance toml_set_memutil to assign default

This commit is contained in:
CK Tan 2020-10-26 13:52:28 -07:00
parent 1901ac3166
commit 2e8feafae8
1 changed files with 4 additions and 4 deletions

8
toml.c
View File

@ -46,10 +46,10 @@ void toml_set_memutil(void* (*xxmalloc)(size_t),
void* (*xxcalloc)(size_t, size_t), void* (*xxcalloc)(size_t, size_t),
void* (*xxrealloc)(void*, size_t)) void* (*xxrealloc)(void*, size_t))
{ {
ppmalloc = xxmalloc; if (xxmalloc) ppmalloc = xxmalloc;
ppfree = xxfree; if (xxfree) ppfree = xxfree;
ppcalloc = xxcalloc; if (xxcalloc) ppcalloc = xxcalloc;
pprealloc = xxrealloc; if (xxrealloc) pprealloc = xxrealloc;
} }