From 672b6df4743dbf76e059c640ad3fe45f7c795594 Mon Sep 17 00:00:00 2001 From: Allen <38368409+AllenX2018@users.noreply.github.com> Date: Wed, 18 Sep 2019 16:18:51 +0800 Subject: [PATCH] Update apiref.rst fix the documentation about json_dumps. refs #471 --- doc/apiref.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/apiref.rst b/doc/apiref.rst index 1b305f5..3c4fa47 100644 --- a/doc/apiref.rst +++ b/doc/apiref.rst @@ -1091,7 +1091,9 @@ These functions output UTF-8: Returns the JSON representation of *json* as a string, or *NULL* on error. *flags* is described above. The return value must be freed - by the caller using :func:`free()`. + by the caller using :func:`free()`. Note that if you have called + :func:`json_set_alloc_funcs()` to override :func:`free()`, you should + call your custom free function instead to free the return value. .. function:: size_t json_dumpb(const json_t *json, char *buffer, size_t size, size_t flags)