summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-05-05 07:48:12 (GMT)
committerGeorg Brandl <georg@python.org>2009-05-05 07:48:12 (GMT)
commitf71ba95e9146872200bbc474337b41b0b4d964de (patch)
tree4fbb76649cd59b8164e31a6fb0be5533c0e9bcc3 /Modules
parentab538fc2b20acc1c82eb28ccfc6450ebfb8d7b1c (diff)
downloadcpython-f71ba95e9146872200bbc474337b41b0b4d964de.zip
cpython-f71ba95e9146872200bbc474337b41b0b4d964de.tar.gz
cpython-f71ba95e9146872200bbc474337b41b0b4d964de.tar.bz2
#5932: fix error return in _convertPyInt_AsSsize_t() conversion function.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_json.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_json.c b/Modules/_json.c
index 0e30469..cfe8708 100644
--- a/Modules/_json.c
+++ b/Modules/_json.c
@@ -143,9 +143,9 @@ _convertPyInt_AsSsize_t(PyObject *o, Py_ssize_t *size_ptr)
{
/* PyObject to Py_ssize_t converter */
*size_ptr = PyInt_AsSsize_t(o);
- if (*size_ptr == -1 && PyErr_Occurred());
- return 1;
- return 0;
+ if (*size_ptr == -1 && PyErr_Occurred())
+ return 0;
+ return 1;
}
static PyObject *