MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / create_reference

Function create_reference

lib/cJSON.c:1846–1858  ·  view source on GitHub ↗

Utility for handling references. */

Source from the content-addressed store, hash-verified

1844
1845/* Utility for handling references. */
1846static cJSON *create_reference(const cJSON *item)
1847{
1848 cJSON *ref = cJSON_New_Item();
1849 if (!ref)
1850 {
1851 return NULL;
1852 }
1853 memcpy(ref, item, sizeof(cJSON));
1854 ref->string = NULL;
1855 ref->type |= cJSON_IsReference;
1856 ref->next = ref->prev = NULL;
1857 return ref;
1858}
1859
1860/* Add item to array/object. */
1861void cJSON_AddItemToArray(cJSON *array, cJSON *item)

Callers 2

Calls 1

cJSON_New_ItemFunction · 0.70

Tested by

no test coverage detected