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

Function cJSON_AddItemToArrayHead

cJSON.c:863–879  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

861}
862
863void cJSON_AddItemToArrayHead(cJSON *array, cJSON *item)
864{
865 cJSON *c = array->child;
866 if (!item)
867 return;
868 if (!c)
869 {
870 array->child = item;
871 }
872 else
873 {
874 item->prev = c->prev;
875 item->next = c;
876 c->prev = item;
877 array->child = item;
878 }
879}
880
881void cJSON_AddItemToObject(cJSON *object, const char *string, cJSON *item)
882{

Callers 3

AddAsFirstMethod · 0.85
AddAsFirstWithMoveMethod · 0.85
AddNullAsFirstMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected