diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2012-03-22 01:09:08 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2012-03-22 01:09:08 (GMT) |
commit | 59af08f5450e7b593a02451a0fb54a4c65579cd6 (patch) | |
tree | 32a3f832d5fc4decf34a86e46415dea67181b81c | |
parent | d5d17eb653196c8bbddde07a024d35a4b152a498 (diff) | |
download | cpython-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().
-rw-r--r-- | Objects/object.c | 2 |
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; } |