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

Function cJSON_CreateStringArray

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

Source from the content-addressed store, hash-verified

1096 return a;
1097}
1098cJSON *cJSON_CreateStringArray(const char **strings, int count)
1099{
1100 int i;
1101 cJSON *n = 0, *p = 0, *a = cJSON_CreateArray();
1102 for (i = 0; a && i < count; i++)
1103 {
1104 n = cJSON_CreateString(strings[i]);
1105 if (!i)
1106 a->child = n;
1107 else
1108 suffix_object(p, n);
1109 p = n;
1110 }
1111 return a;
1112}
1113

Callers

nothing calls this directly

Calls 3

cJSON_CreateArrayFunction · 0.85
cJSON_CreateStringFunction · 0.85
suffix_objectFunction · 0.85

Tested by

no test coverage detected