MCPcopy Create free account
hub / github.com/OpenDriveLab/OpenLane / cJSON_AddItemToArray

Function cJSON_AddItemToArray

eval/LANE_evaluation/lane2d/src/cJSON.c:852–867  ·  view source on GitHub ↗

Add item to array/object. */

Source from the content-addressed store, hash-verified

850
851/* Add item to array/object. */
852void cJSON_AddItemToArray(cJSON *array, cJSON *item)
853{
854 cJSON *c = array->child;
855 if (!item)
856 return;
857 if (!c)
858 {
859 array->child = item;
860 }
861 else
862 {
863 while (c && c->next)
864 c = c->next;
865 suffix_object(c, item);
866 }
867}
868
869void cJSON_AddItemToArrayHead(cJSON *array, cJSON *item)
870{

Callers 5

AddMethod · 0.85
AddWithMoveMethod · 0.85
AddNullMethod · 0.85
cJSON_AddItemToObjectFunction · 0.85

Calls 1

suffix_objectFunction · 0.85

Tested by

no test coverage detected