From: Victor Stinner Date: Thu, 22 Mar 2012 01:09:08 +0000 (+0100) Subject: Micro-optimize PyObject_GetAttrString() X-Git-Tag: v3.3.0a2~94 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=59af08f5450e7b593a02451a0fb54a4c65579cd6;p=python Micro-optimize PyObject_GetAttrString() w cannot be NULL so use Py_DECREF() instead of Py_XDECREF(). --- diff --git a/Objects/object.c b/Objects/object.c index 69d5f83a69..1b7f609206 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; }