MCPcopy Index your code
hub / github.com/DaveGamble/cJSON / cJSONUtils_ApplyPatches

Function cJSONUtils_ApplyPatches

cJSON_Utils.c:1038–1065  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1036}
1037
1038CJSON_PUBLIC(int) cJSONUtils_ApplyPatches(cJSON * const object, const cJSON * const patches)
1039{
1040 const cJSON *current_patch = NULL;
1041 int status = 0;
1042
1043 if (!cJSON_IsArray(patches))
1044 {
1045 /* malformed patches. */
1046 return 1;
1047 }
1048
1049 if (patches != NULL)
1050 {
1051 current_patch = patches->child;
1052 }
1053
1054 while (current_patch != NULL)
1055 {
1056 status = apply_patch(object, current_patch, false);
1057 if (status != 0)
1058 {
1059 return status;
1060 }
1061 current_patch = current_patch->next;
1062 }
1063
1064 return 0;
1065}
1066
1067CJSON_PUBLIC(int) cJSONUtils_ApplyPatchesCaseSensitive(cJSON * const object, const cJSON * const patches)
1068{

Calls 2

cJSON_IsArrayFunction · 0.85
apply_patchFunction · 0.85

Used in the wild real call sites across dependent graphs

searching dependent graphs…