MCPcopy Create free account
hub / github.com/PointCloudLibrary/pcl / cJSON_AddItemToArray

Function cJSON_AddItemToArray

outofcore/src/cJSON.cpp:517–517  ·  view source on GitHub ↗

Add item to array/object. */

Source from the content-addressed store, hash-verified

515
516/* Add item to array/object. */
517void cJSON_AddItemToArray(cJSON *array, cJSON *item) {cJSON *c=array->child;if (!item) return; if (!c) {array->child=item;} else {while (c && c->next) c=c->next; suffix_object(c,item);}}
518void cJSON_AddItemToObject(cJSON *object,const char *string,cJSON *item) {if (!item) return; if (item->string) cJSON_free(item->string);item->string=cJSON_strdup(string);cJSON_AddItemToArray(object,item);}
519void cJSON_AddItemReferenceToArray(cJSON *array, cJSON *item) {cJSON_AddItemToArray(array,create_reference(item));}
520void cJSON_AddItemReferenceToObject(cJSON *object,const char *string,cJSON *item) {cJSON_AddItemToObject(object,string,create_reference(item));}

Callers 3

cJSON_AddItemToObjectFunction · 0.85
cJSON.hFile · 0.85

Calls 1

suffix_objectFunction · 0.85

Tested by

no test coverage detected