enhance toml_set_memutil to assign default
This commit is contained in:
parent
1901ac3166
commit
2e8feafae8
1 changed files with 4 additions and 4 deletions
8
toml.c
8
toml.c
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue