diff options
author | Nathaniel McCallum <npmccallum@redhat.com> | 2015-12-21 11:46:32 -0500 |
---|---|---|
committer | Nathaniel McCallum <npmccallum@redhat.com> | 2015-12-21 11:46:32 -0500 |
commit | 245e532934fc9a6df18cf246c29c79863d6ce714 (patch) | |
tree | 010021acac3d0883646163d2dad7902acadecaeb /doc | |
parent | e44b2231b50aea5de78b7ea2debec0d5327cd711 (diff) | |
download | jansson-245e532934fc9a6df18cf246c29c79863d6ce714.zip jansson-245e532934fc9a6df18cf246c29c79863d6ce714.tar.gz jansson-245e532934fc9a6df18cf246c29c79863d6ce714.tar.bz2 |
Add json_get_alloc_funcs() to allow alloc function fetching
This is particularly useful in modular situations where the allocation
functions are either unknown or private. For instance, in such cases,
the caller of json_dumps() has no way to free the returned buffer.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/apiref.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/apiref.rst b/doc/apiref.rst index a921ef7..0aca86f 100644 --- a/doc/apiref.rst +++ b/doc/apiref.rst @@ -1570,6 +1570,11 @@ behavior is needed. Jansson's API functions to ensure that all memory operations use the same functions. +.. function:: void json_get_alloc_funcs(json_malloc_t *malloc_fn, json_free_t *free_fn) + + Fetch the current malloc_fn and free_fn used. Either parameter + may be NULL. + **Examples:** Circumvent problems with different CRT heaps on Windows by using |