Lines Matching refs:newitem

1116 void cJSON_InsertItemInArray(cJSON *array, int which, cJSON *newitem) {  in cJSON_InsertItemInArray()  argument
1121 cJSON_AddItemToArray(array, newitem); in cJSON_InsertItemInArray()
1124 newitem->next = c; in cJSON_InsertItemInArray()
1125 newitem->prev = c->prev; in cJSON_InsertItemInArray()
1126 c->prev = newitem; in cJSON_InsertItemInArray()
1128 array->child = newitem; in cJSON_InsertItemInArray()
1130 newitem->prev->next = newitem; in cJSON_InsertItemInArray()
1132 void cJSON_ReplaceItemInArray(cJSON *array, int which, cJSON *newitem) { in cJSON_ReplaceItemInArray() argument
1138 newitem->next = c->next; in cJSON_ReplaceItemInArray()
1139 newitem->prev = c->prev; in cJSON_ReplaceItemInArray()
1140 if (newitem->next) in cJSON_ReplaceItemInArray()
1141 newitem->next->prev = newitem; in cJSON_ReplaceItemInArray()
1143 array->child = newitem; in cJSON_ReplaceItemInArray()
1145 newitem->prev->next = newitem; in cJSON_ReplaceItemInArray()
1150 cJSON *newitem) { in cJSON_ReplaceItemInObject() argument
1156 newitem->string = cJSON_strdup(string); in cJSON_ReplaceItemInObject()
1157 cJSON_ReplaceItemInArray(object, i, newitem); in cJSON_ReplaceItemInObject()
1272 cJSON *newitem, *cptr, *nptr = 0, *newchild; in cJSON_Duplicate() local
1277 newitem = cJSON_New_Item(); in cJSON_Duplicate()
1278 if (!newitem) in cJSON_Duplicate()
1281 newitem->type = item->type & (~cJSON_IsReference), in cJSON_Duplicate()
1282 newitem->valueint = item->valueint, in cJSON_Duplicate()
1283 newitem->valuedouble = item->valuedouble; in cJSON_Duplicate()
1285 newitem->valuestring = cJSON_strdup(item->valuestring); in cJSON_Duplicate()
1286 if (!newitem->valuestring) { in cJSON_Duplicate()
1287 cJSON_Delete(newitem); in cJSON_Duplicate()
1292 newitem->string = cJSON_strdup(item->string); in cJSON_Duplicate()
1293 if (!newitem->string) { in cJSON_Duplicate()
1294 cJSON_Delete(newitem); in cJSON_Duplicate()
1300 return newitem; in cJSON_Duplicate()
1308 cJSON_Delete(newitem); in cJSON_Duplicate()
1317 newitem->child = newchild; in cJSON_Duplicate()
1322 return newitem; in cJSON_Duplicate()