summaryrefslogtreecommitdiffstats
path: root/Objects/object.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2012-03-22 01:09:08 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2012-03-22 01:09:08 (GMT)
commit59af08f5450e7b593a02451a0fb54a4c65579cd6 (patch)
tree32a3f832d5fc4decf34a86e46415dea67181b81c /Objects/object.c
parentd5d17eb653196c8bbddde07a024d35a4b152a498 (diff)
downloadcpython-59af08f5450e7b593a02451a0fb54a4c65579cd6.zip
cpython-59af08f5450e7b593a02451a0fb54a4c65579cd6.tar.gz
cpython-59af08f5450e7b593a02451a0fb54a4c65579cd6.tar.bz2
Micro-optimize PyObject_GetAttrString()
w cannot be NULL so use Py_DECREF() instead of Py_XDECREF().
Diffstat (limited to 'Objects/object.c')
-rw-r--r--Objects/object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/object.c b/Objects/object.c
index 69d5f83..1b7f609 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -820,7 +820,7 @@ PyObject_GetAttrString(PyObject *v, const char *name)
if (w == NULL)
return NULL;
res = PyObject_GetAttr(v, w);
- Py_XDECREF(w);
+ Py_DECREF(w);
return res;
}