Micro-optimize PyObject_GetAttrString()

w cannot be NULL so use Py_DECREF() instead of Py_XDECREF().
This commit is contained in:
Victor Stinner 2012-03-22 02:09:08 +01:00
parent d5d17eb653
commit 59af08f545
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}