Lines Matching full:replacement
2288 …ON_bool) cJSON_ReplaceItemViaPointer(cJSON * const parent, cJSON * const item, cJSON * replacement) in cJSON_ReplaceItemViaPointer() argument
2290 if ((parent == NULL) || (replacement == NULL) || (item == NULL)) in cJSON_ReplaceItemViaPointer()
2295 if (replacement == item) in cJSON_ReplaceItemViaPointer()
2300 replacement->next = item->next; in cJSON_ReplaceItemViaPointer()
2301 replacement->prev = item->prev; in cJSON_ReplaceItemViaPointer()
2303 if (replacement->next != NULL) in cJSON_ReplaceItemViaPointer()
2305 replacement->next->prev = replacement; in cJSON_ReplaceItemViaPointer()
2311 replacement->prev = replacement; in cJSON_ReplaceItemViaPointer()
2313 parent->child = replacement; in cJSON_ReplaceItemViaPointer()
2320 if (replacement->prev != NULL) in cJSON_ReplaceItemViaPointer()
2322 replacement->prev->next = replacement; in cJSON_ReplaceItemViaPointer()
2324 if (replacement->next == NULL) in cJSON_ReplaceItemViaPointer()
2326 parent->child->prev = replacement; in cJSON_ReplaceItemViaPointer()
2347 static cJSON_bool replace_item_in_object(cJSON *object, const char *string, cJSON *replacement, cJS… in replace_item_in_object() argument
2349 if ((replacement == NULL) || (string == NULL)) in replace_item_in_object()
2354 /* replace the name in the replacement */ in replace_item_in_object()
2355 if (!(replacement->type & cJSON_StringIsConst) && (replacement->string != NULL)) in replace_item_in_object()
2357 cJSON_free(replacement->string); in replace_item_in_object()
2359 replacement->string = (char*)cJSON_strdup((const unsigned char*)string, &global_hooks); in replace_item_in_object()
2360 replacement->type &= ~cJSON_StringIsConst; in replace_item_in_object()
2362 … cJSON_ReplaceItemViaPointer(object, get_object_item(object, string, case_sensitive), replacement); in replace_item_in_object()