MCPcopy Create free account
hub / github.com/Bwar/CJsonObject / create_reference

Function create_reference

cJSON.c:833–843  ·  view source on GitHub ↗

Utility for handling references. */

Source from the content-addressed store, hash-verified

831}
832/* Utility for handling references. */
833static cJSON *create_reference(cJSON *item)
834{
835 cJSON *ref = cJSON_New_Item();
836 if (!ref)
837 return 0;
838 memcpy(ref, item, sizeof(cJSON));
839 ref->string = 0;
840 ref->type |= cJSON_IsReference;
841 ref->next = ref->prev = 0;
842 return ref;
843}
844
845/* Add item to array/object. */
846void cJSON_AddItemToArray(cJSON *array, cJSON *item)

Callers 2

Calls 1

cJSON_New_ItemFunction · 0.85

Tested by

no test coverage detected