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

Function cJSON_ReplaceItemInObject

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

Source from the content-addressed store, hash-verified

958 cJSON_Delete(c);
959}
960void cJSON_ReplaceItemInObject(cJSON *object, const char *string,
961 cJSON *newitem)
962{
963 int i = 0;
964 cJSON *c = object->child;
965 while (c && cJSON_strcasecmp(c->string, string))
966 i++, c = c->next;
967 if (c)
968 {
969 newitem->string = cJSON_strdup(string);
970 cJSON_ReplaceItemInArray(object, i, newitem);
971 }
972}
973
974/* Create basic types: */
975cJSON *cJSON_CreateNull()

Callers 3

ReplaceMethod · 0.85
ReplaceWithMoveMethod · 0.85
ReplaceWithNullMethod · 0.85

Calls 3

cJSON_strcasecmpFunction · 0.85
cJSON_strdupFunction · 0.85
cJSON_ReplaceItemInArrayFunction · 0.85

Tested by

no test coverage detected