MCPcopy Create free account
hub / github.com/Tencent/Hardcoder / get_array_item

Function get_array_item

libapp2sys/src/main/cpp/cjson/cJSON.c:1747–1764  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1745}
1746
1747static cJSON* get_array_item(const cJSON *array, size_t index)
1748{
1749 cJSON *current_child = NULL;
1750
1751 if (array == NULL)
1752 {
1753 return NULL;
1754 }
1755
1756 current_child = array->child;
1757 while ((current_child != NULL) && (index > 0))
1758 {
1759 index--;
1760 current_child = current_child->next;
1761 }
1762
1763 return current_child;
1764}
1765
1766CJSON_PUBLIC(cJSON *) cJSON_GetArrayItem(const cJSON *array, int index)
1767{

Callers 4

cJSON_GetArrayItemFunction · 0.85
cJSON_InsertItemInArrayFunction · 0.85
cJSON_ReplaceItemInArrayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected