MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / get_array_item

Function get_array_item

TheForceEngine/TFE_System/cJSON.c:1856–1873  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1854}
1855
1856static cJSON* get_array_item(const cJSON *array, size_t index)
1857{
1858 cJSON *current_child = NULL;
1859
1860 if (array == NULL)
1861 {
1862 return NULL;
1863 }
1864
1865 current_child = array->child;
1866 while ((current_child != NULL) && (index > 0))
1867 {
1868 index--;
1869 current_child = current_child->next;
1870 }
1871
1872 return current_child;
1873}
1874
1875CJSON_PUBLIC(cJSON *) cJSON_GetArrayItem(const cJSON *array, int index)
1876{

Callers 4

cJSON_GetArrayItemFunction · 0.85
cJSON_InsertItemInArrayFunction · 0.85
cJSON_ReplaceItemInArrayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected