diff options
author | Bob Ippolito <bob@redivi.com> | 2022-11-14 11:23:30 -0800 |
---|---|---|
committer | Bob Ippolito <bob@redivi.com> | 2022-11-14 11:23:30 -0800 |
commit | 41f81a832de7c87210422f4f664aad353822a9bc (patch) | |
tree | ad4b17c4507e0b48afbb28381b19010e37dda1e6 | |
parent | 2c2c99830cca68cf7e2b7b67ff85397a7b032828 (diff) | |
download | simplejson-41f81a832de7c87210422f4f664aad353822a9bc.tar.gz |
Rename variable for clarity
-rw-r--r-- | simplejson/_speedups.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/simplejson/_speedups.c b/simplejson/_speedups.c index f99666a..13dc891 100644 --- a/simplejson/_speedups.c +++ b/simplejson/_speedups.c @@ -396,13 +396,13 @@ static int _call_json_method(PyObject *obj, const char *method_name, PyObject **result) { int rval = 0; - PyObject *_asdict = PyObject_GetAttrString(obj, method_name); - if (_asdict == NULL) { + PyObject *method = PyObject_GetAttrString(obj, method_name); + if (method == NULL) { PyErr_Clear(); return 0; } - if (PyCallable_Check(_asdict)) { - PyObject *tmp = PyObject_CallNoArgs(_asdict); + if (PyCallable_Check(method)) { + PyObject *tmp = PyObject_CallNoArgs(method); if (tmp == NULL && PyErr_ExceptionMatches(PyExc_TypeError)) { PyErr_Clear(); } else { @@ -412,7 +412,7 @@ _call_json_method(PyObject *obj, const char *method_name, PyObject **result) rval = 1; } } - Py_DECREF(_asdict); + Py_DECREF(method); return rval; } |