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

Function cJSONUtils_ApplyPatchesCaseSensitive

cJSON_Utils.c:1067–1094  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1065}
1066
1067CJSON_PUBLIC(int) cJSONUtils_ApplyPatchesCaseSensitive(cJSON * const object, const cJSON * const patches)
1068{
1069 const cJSON *current_patch = NULL;
1070 int status = 0;
1071
1072 if (!cJSON_IsArray(patches))
1073 {
1074 /* malformed patches. */
1075 return 1;
1076 }
1077
1078 if (patches != NULL)
1079 {
1080 current_patch = patches->child;
1081 }
1082
1083 while (current_patch != NULL)
1084 {
1085 status = apply_patch(object, current_patch, true);
1086 if (status != 0)
1087 {
1088 return status;
1089 }
1090 current_patch = current_patch->next;
1091 }
1092
1093 return 0;
1094}
1095
1096static void compose_patch(cJSON * const patches, const unsigned char * const operation, const unsigned char * const path, const unsigned char *suffix, const cJSON * const value)
1097{

Calls 2

cJSON_IsArrayFunction · 0.85
apply_patchFunction · 0.85

Used in the wild real call sites across dependent graphs

searching dependent graphs…