From 59af08f5450e7b593a02451a0fb54a4c65579cd6 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 22 Mar 2012 02:09:08 +0100 Subject: [PATCH] Micro-optimize PyObject_GetAttrString() w cannot be NULL so use Py_DECREF() instead of Py_XDECREF(). --- Objects/object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.50.0