MCPcopy Create free account
hub / github.com/Tencent/TAD_Sim / cJSON_DetachItemFromArray

Function cJSON_DetachItemFromArray

common/map_sdk/transmission/src/cJSON.cpp:724–733  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

722}
723
724cJSON *cJSON_DetachItemFromArray(cJSON *array, int which) {
725 cJSON *c = array->child;
726 while (c && which > 0) c = c->next, which--;
727 if (!c) return 0;
728 if (c->prev) c->prev->next = c->next;
729 if (c->next) c->next->prev = c->prev;
730 if (c == array->child) array->child = c->next;
731 c->prev = c->next = 0;
732 return c;
733}
734void cJSON_DeleteItemFromArray(cJSON *array, int which) { cJSON_Delete(cJSON_DetachItemFromArray(array, which)); }
735cJSON *cJSON_DetachItemFromObject(cJSON *object, const char *string) {
736 int i = 0;

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected