summaryrefslogtreecommitdiff
path: root/simplejson/_speedups.c
diff options
context:
space:
mode:
Diffstat (limited to 'simplejson/_speedups.c')
-rw-r--r--simplejson/_speedups.c10
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;
}