apiref: Clarify documentation for unpack O
format.
The `O` format causes reference counts to increase, but in an error they are not released. Callers to unpack functions that use the `O` format should use pointers pre-initialized to NULL so they can safely release the reference on error. Also corrected typo which said this was like `O` (itself). Fixes #135
This commit is contained in:
parent
89dad8959b
commit
6c78910011
@ -1564,7 +1564,10 @@ type whose address should be passed.
|
||||
Store a JSON value with no conversion to a :type:`json_t` pointer.
|
||||
|
||||
``O`` (any value) [json_t \*]
|
||||
Like ``O``, but the JSON value's reference count is incremented.
|
||||
Like ``o``, but the JSON value's reference count is incremented.
|
||||
Storage pointers should be initialized NULL before using unpack.
|
||||
The caller is responsible for releasing all references incremented
|
||||
by unpack, even when an error occurs.
|
||||
|
||||
``[fmt]`` (array)
|
||||
Convert each item in the JSON array according to the inner format
|
||||
|
Loading…
Reference in New Issue
Block a user