Skip to content

Commit 59af08f

Browse files
committed
Micro-optimize PyObject_GetAttrString()
w cannot be NULL so use Py_DECREF() instead of Py_XDECREF().
1 parent d5d17eb commit 59af08f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Objects/object.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ PyObject_GetAttrString(PyObject *v, const char *name)
820820
if (w == NULL)
821821
return NULL;
822822
res = PyObject_GetAttr(v, w);
823-
Py_XDECREF(w);
823+
Py_DECREF(w);
824824
return res;
825825
}
826826

0 commit comments

Comments
 (0)