summaryrefslogtreecommitdiffstats
path: root/Modules/_json.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2022-12-03 19:52:21 (GMT)
committerGitHub <noreply@github.com>2022-12-03 19:52:21 (GMT)
commita87c46eab3c306b1c5b8a072b7b30ac2c50651c0 (patch)
tree92c0ebdb6abd303ea967c0bd999d839a98f84494 /Modules/_json.c
parentc68573b339320409b038501fdd7d4f8a56766275 (diff)
downloadcpython-a87c46eab3c306b1c5b8a072b7b30ac2c50651c0.zip
cpython-a87c46eab3c306b1c5b8a072b7b30ac2c50651c0.tar.gz
cpython-a87c46eab3c306b1c5b8a072b7b30ac2c50651c0.tar.bz2
bpo-15999: Accept arbitrary values for boolean parameters. (#15609)
builtins and extension module functions and methods that expect boolean values for parameters now accept any Python object rather than just a bool or int type. This is more consistent with how native Python code itself behaves.
Diffstat (limited to 'Modules/_json.c')
-rw-r--r--Modules/_json.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_json.c b/Modules/_json.c
index 81431aa..429b4ee 100644
--- a/Modules/_json.c
+++ b/Modules/_json.c
@@ -556,7 +556,7 @@ py_scanstring(PyObject* Py_UNUSED(self), PyObject *args)
Py_ssize_t end;
Py_ssize_t next_end = -1;
int strict = 1;
- if (!PyArg_ParseTuple(args, "On|i:scanstring", &pystr, &end, &strict)) {
+ if (!PyArg_ParseTuple(args, "On|p:scanstring", &pystr, &end, &strict)) {
return NULL;
}
if (PyUnicode_Check(pystr)) {