csonpath 0.12.1__tar.gz → 0.13.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {csonpath-0.12.1/csonpath.egg-info → csonpath-0.13.0}/PKG-INFO +1 -1
- {csonpath-0.12.1 → csonpath-0.13.0/csonpath.egg-info}/PKG-INFO +1 -1
- {csonpath-0.12.1 → csonpath-0.13.0}/csonpath.h +14 -12
- {csonpath-0.12.1 → csonpath-0.13.0}/csonpath_python.c +3 -2
- {csonpath-0.12.1 → csonpath-0.13.0}/pyproject.toml +2 -2
- {csonpath-0.12.1 → csonpath-0.13.0}/LICENSE +0 -0
- {csonpath-0.12.1 → csonpath-0.13.0}/MANIFEST.in +0 -0
- {csonpath-0.12.1 → csonpath-0.13.0}/Makefile +0 -0
- {csonpath-0.12.1 → csonpath-0.13.0}/README.md +0 -0
- {csonpath-0.12.1 → csonpath-0.13.0}/configure +0 -0
- {csonpath-0.12.1 → csonpath-0.13.0}/csonpath.egg-info/SOURCES.txt +0 -0
- {csonpath-0.12.1 → csonpath-0.13.0}/csonpath.egg-info/dependency_links.txt +0 -0
- {csonpath-0.12.1 → csonpath-0.13.0}/csonpath.egg-info/requires.txt +0 -0
- {csonpath-0.12.1 → csonpath-0.13.0}/csonpath.egg-info/top_level.txt +0 -0
- {csonpath-0.12.1 → csonpath-0.13.0}/csonpath_do.h +0 -0
- {csonpath-0.12.1 → csonpath-0.13.0}/csonpath_json-c.h +0 -0
- {csonpath-0.12.1 → csonpath-0.13.0}/csonpath_yyjson.h +0 -0
- {csonpath-0.12.1 → csonpath-0.13.0}/setup.cfg +0 -0
- {csonpath-0.12.1 → csonpath-0.13.0}/setup.py +0 -0
- {csonpath-0.12.1 → csonpath-0.13.0}/tiny-regex-c/.git +0 -0
- {csonpath-0.12.1 → csonpath-0.13.0}/tiny-regex-c/.github/workflows/c-cpp.yml +0 -0
- {csonpath-0.12.1 → csonpath-0.13.0}/tiny-regex-c/.gitignore +0 -0
- {csonpath-0.12.1 → csonpath-0.13.0}/tiny-regex-c/LICENSE +0 -0
- {csonpath-0.12.1 → csonpath-0.13.0}/tiny-regex-c/Makefile +0 -0
- {csonpath-0.12.1 → csonpath-0.13.0}/tiny-regex-c/README.md +0 -0
- {csonpath-0.12.1 → csonpath-0.13.0}/tiny-regex-c/clib.json +0 -0
- {csonpath-0.12.1 → csonpath-0.13.0}/tiny-regex-c/formal_verification.md +0 -0
- {csonpath-0.12.1 → csonpath-0.13.0}/tiny-regex-c/re.c +0 -0
- {csonpath-0.12.1 → csonpath-0.13.0}/tiny-regex-c/re.h +0 -0
- {csonpath-0.12.1 → csonpath-0.13.0}/tiny-regex-c/scripts/exrex.py +0 -0
- {csonpath-0.12.1 → csonpath-0.13.0}/tiny-regex-c/scripts/regex_test.py +0 -0
- {csonpath-0.12.1 → csonpath-0.13.0}/tiny-regex-c/scripts/regex_test_neg.py +0 -0
- {csonpath-0.12.1 → csonpath-0.13.0}/tiny-regex-c/tests/test1.c +0 -0
- {csonpath-0.12.1 → csonpath-0.13.0}/tiny-regex-c/tests/test2.c +0 -0
- {csonpath-0.12.1 → csonpath-0.13.0}/tiny-regex-c/tests/test3.c +0 -0
- {csonpath-0.12.1 → csonpath-0.13.0}/tiny-regex-c/tests/test_compile.c +0 -0
- {csonpath-0.12.1 → csonpath-0.13.0}/tiny-regex-c/tests/test_print.c +0 -0
- {csonpath-0.12.1 → csonpath-0.13.0}/tiny-regex-c/tests/test_rand.c +0 -0
- {csonpath-0.12.1 → csonpath-0.13.0}/tiny-regex-c/tests/test_rand_neg.c +0 -0
- {csonpath-0.12.1 → csonpath-0.13.0}/tiny-regex-c/tests/test_thread.c +0 -0
|
@@ -918,9 +918,9 @@ need_reloop_in = 0;
|
|
|
918
918
|
#define CSONPATH_NONE_FOUND_RET CSONPATH_NULL
|
|
919
919
|
|
|
920
920
|
#define CSONPATH_GETTER_ERR(args...) do { \
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
921
|
+
CSONPATH_FORMAT_EXCEPTION(args); \
|
|
922
|
+
return CSONPATH_NULL; \
|
|
923
|
+
} while (0)
|
|
924
924
|
|
|
925
925
|
/* Find First */
|
|
926
926
|
|
|
@@ -980,10 +980,10 @@ need_reloop_in = 0;
|
|
|
980
980
|
|
|
981
981
|
#define CSONPATH_NONE_FOUND_RET 0
|
|
982
982
|
|
|
983
|
-
#define CSONPATH_GETTER_ERR(args...) do {
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
983
|
+
#define CSONPATH_GETTER_ERR(args...) do { \
|
|
984
|
+
CSONPATH_FORMAT_EXCEPTION(args); \
|
|
985
|
+
return -1; \
|
|
986
|
+
} while (0)
|
|
987
987
|
|
|
988
988
|
#define CSONPATH_DO_ON_FOUND
|
|
989
989
|
|
|
@@ -1104,7 +1104,8 @@ static int csonpath_sync_root_array(CSONPATH_JSON parent, CSONPATH_JSON to_updat
|
|
|
1104
1104
|
|
|
1105
1105
|
CSONPATH_ARRAY_CLEAR(parent);
|
|
1106
1106
|
CSONPATH_FOREACH_ARRAY(to_update, child, idx) {
|
|
1107
|
-
CSONPATH_APPEND_AT(parent, idx, child)
|
|
1107
|
+
if (CSONPATH_APPEND_AT(parent, idx, child) < 0)
|
|
1108
|
+
return -1;
|
|
1108
1109
|
}
|
|
1109
1110
|
return 1;
|
|
1110
1111
|
}
|
|
@@ -1116,7 +1117,8 @@ static int csonpath_sync_root_obj(CSONPATH_JSON parent, CSONPATH_JSON to_update)
|
|
|
1116
1117
|
|
|
1117
1118
|
CSONPATH_OBJ_CLEAR(parent);
|
|
1118
1119
|
CSONPATH_FOREACH_OBJ(to_update, child, key) {
|
|
1119
|
-
CSONPATH_APPEND_AT(parent, key, child)
|
|
1120
|
+
if (CSONPATH_APPEND_AT(parent, key, child) < 0)
|
|
1121
|
+
return -1;
|
|
1120
1122
|
}
|
|
1121
1123
|
return 1;
|
|
1122
1124
|
}
|
|
@@ -1129,7 +1131,7 @@ static int csonpath_sync_root_obj(CSONPATH_JSON parent, CSONPATH_JSON to_update)
|
|
|
1129
1131
|
} else if (CSONPATH_IS_ARRAY(origin) && CSONPATH_IS_ARRAY(to_update)) { \
|
|
1130
1132
|
return csonpath_sync_root_array(origin, to_update); \
|
|
1131
1133
|
} else { \
|
|
1132
|
-
CSONPATH_EXCEPTION("can't
|
|
1134
|
+
CSONPATH_EXCEPTION("can't update root ($)\n"); \
|
|
1133
1135
|
} \
|
|
1134
1136
|
}
|
|
1135
1137
|
|
|
@@ -1141,7 +1143,7 @@ static int csonpath_sync_root_obj(CSONPATH_JSON parent, CSONPATH_JSON to_update)
|
|
|
1141
1143
|
to_check = *check_at; \
|
|
1142
1144
|
} while (to_check == CSONPATH_INST_GET_ALL || to_check == CSONPATH_INST_FIND_ALL); \
|
|
1143
1145
|
if (to_check == CSONPATH_INST_END || to_check == CSONPATH_INST_OR) { \
|
|
1144
|
-
CSONPATH_APPEND_AT(ctx, this_idx, to_update);
|
|
1146
|
+
if (CSONPATH_APPEND_AT(ctx, this_idx, to_update) < 0) return -1; \
|
|
1145
1147
|
return 1; \
|
|
1146
1148
|
}
|
|
1147
1149
|
|
|
@@ -1215,7 +1217,7 @@ static int csonpath_sync_root_obj(CSONPATH_JSON parent, CSONPATH_JSON to_update)
|
|
|
1215
1217
|
#define CSONPATH_PRE_GET_ROOT \
|
|
1216
1218
|
int to_check = *walker; \
|
|
1217
1219
|
if (to_check == CSONPATH_INST_END || to_check == CSONPATH_INST_OR) { \
|
|
1218
|
-
CSONPATH_GETTER_ERR("can't
|
|
1220
|
+
CSONPATH_GETTER_ERR("can't update root ($)\n"); \
|
|
1219
1221
|
return CSONPATH_NONE_FOUND_RET; \
|
|
1220
1222
|
}
|
|
1221
1223
|
|
|
@@ -313,10 +313,11 @@ static PyObject *update_or_create(PyCsonPathObject *self, PyObject* args)
|
|
|
313
313
|
PyObject *value;
|
|
314
314
|
|
|
315
315
|
if (!PyArg_ParseTuple(args, "OO", &json, &value))
|
|
316
|
-
|
|
316
|
+
BAD_ARG();
|
|
317
317
|
int ret = csonpath_update_or_create(self->cp, json, value);
|
|
318
|
-
if (ret < 0)
|
|
318
|
+
if (ret < 0) {
|
|
319
319
|
return NULL;
|
|
320
|
+
}
|
|
320
321
|
return PyLong_FromLong(ret);
|
|
321
322
|
}
|
|
322
323
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "csonpath"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.13.0"
|
|
8
8
|
readme = "README.md"
|
|
9
9
|
|
|
10
10
|
[tool.setuptools]
|
|
@@ -27,7 +27,7 @@ test-command = "pytest {project}/tests/python"
|
|
|
27
27
|
before-build = "choco install mingw -y"
|
|
28
28
|
|
|
29
29
|
[tool.bumpversion]
|
|
30
|
-
current_version = "0.
|
|
30
|
+
current_version = "0.13.0"
|
|
31
31
|
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
|
|
32
32
|
serialize = ["{major}.{minor}.{patch}"]
|
|
33
33
|
search = "{current_version}"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|