mirror of https://github.com/python/cpython
Micro-optimize PyObject_GetAttrString()
w cannot be NULL so use Py_DECREF() instead of Py_XDECREF().
This commit is contained in:
parent
d5d17eb653
commit
59af08f545
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue