MCPcopy Create free account
hub / github.com/Tencent/TAD_Sim / create_reference

Function create_reference

common/map_sdk/transmission/src/cJSON.cpp:678–686  ·  view source on GitHub ↗

Utility for handling references. */

Source from the content-addressed store, hash-verified

676}
677/* Utility for handling references. */
678static cJSON *create_reference(cJSON *item) {
679 cJSON *ref = cJSON_New_Item();
680 if (!ref) return 0;
681 memcpy(ref, item, sizeof(cJSON));
682 ref->string = 0;
683 ref->type |= cJSON_IsReference;
684 ref->next = ref->prev = 0;
685 return ref;
686}
687
688/* Add item to array/object. */
689void cJSON_AddItemToArray(cJSON *array, cJSON *item) {

Callers 2

Calls 1

cJSON_New_ItemFunction · 0.85

Tested by

no test coverage detected