cJSON_AddItemToObjectCS function
Use this when string is definitely const (i.e. a literal, or as good as), and will definitely survive the cJSON object.
WARNING: When this function was used, make sure to always check that (item->type & cJSON_StringIsConst) is zero before
writing to item->string
Implementation
@ffi.Native<
cJSON_bool Function(
ffi.Pointer<cJSON>,
ffi.Pointer<ffi.Char>,
ffi.Pointer<cJSON>,
)
>()
external int cJSON_AddItemToObjectCS(
ffi.Pointer<cJSON> object,
ffi.Pointer<ffi.Char> string,
ffi.Pointer<cJSON> item,
);