kw_incref()

kw_incref()#

Increments the reference count of the given JSON object kw and its associated binary fields if applicable.

Prototype

json_t *kw_incref(
    json_t *kw
);

Parameters

Key

Type

Description

kw

json_t *

A pointer to the JSON object whose reference count should be incremented.


Return Value

Returns the same JSON object kw with an incremented reference count, or NULL if kw is invalid.

Notes

If kw contains binary fields registered with kw_add_binary_type(), their reference counts are also incremented.

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples