diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2018-07-31 06:09:36 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-31 06:09:36 (GMT) |
commit | 48c8bf21f97aeb124dbd48bf2bdec1ab4ebc5202 (patch) | |
tree | 6678ae7f56e368ef192b8e0f5988f7c317dbb246 /Modules/_json.c | |
parent | dc9039da239ee572eaaf56e4a026be1fc4d74e24 (diff) | |
download | cpython-48c8bf21f97aeb124dbd48bf2bdec1ab4ebc5202.zip cpython-48c8bf21f97aeb124dbd48bf2bdec1ab4ebc5202.tar.gz cpython-48c8bf21f97aeb124dbd48bf2bdec1ab4ebc5202.tar.bz2 |
[2.7] bpo-34234: Use _PyAnyInt_Check() and _PyAnyInt_CheckExact(). (GH-8479)
Diffstat (limited to 'Modules/_json.c')
-rw-r--r-- | Modules/_json.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_json.c b/Modules/_json.c index 39ec467..28c0b3f 100644 --- a/Modules/_json.c +++ b/Modules/_json.c @@ -1981,7 +1981,7 @@ encoder_listencode_obj(PyEncoderObject *s, PyObject *rval, PyObject *obj, Py_ssi return -1; return _steal_list_append(rval, encoded); } - else if (PyInt_Check(obj) || PyLong_Check(obj)) { + else if (_PyAnyInt_Check(obj)) { PyObject *encoded = PyObject_Str(obj); if (encoded == NULL) return -1; @@ -2131,7 +2131,7 @@ encoder_listencode_dict(PyEncoderObject *s, PyObject *rval, PyObject *dct, Py_ss if (kstr == NULL) goto bail; } - else if (PyInt_Check(key) || PyLong_Check(key)) { + else if (_PyAnyInt_Check(key)) { kstr = PyObject_Str(key); if (kstr == NULL) goto bail; |