aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHai Shi <shihai1992@gmail.com>2019-06-17 04:19:19 +0800
committerBenjamin Peterson <benjamin@python.org>2019-06-16 13:19:19 -0700
commitc83356cae2e375324ff4a3fb5d574ebde5c827a9 (patch)
tree6c470958d38a21777b739d525987cd577d46c7d5 /Objects/classobject.c
parentbpo-28805: document METH_FASTCALL (GH-14079) (diff)
downloadcpython-c83356cae2e375324ff4a3fb5d574ebde5c827a9.tar.gz
cpython-c83356cae2e375324ff4a3fb5d574ebde5c827a9.tar.bz2
cpython-c83356cae2e375324ff4a3fb5d574ebde5c827a9.zip
closes bpo-37300: Remove unnecessary Py_XINCREF in classobject.c. (GH-14120)
Diffstat (limited to 'Objects/classobject.c')
-rw-r--r--Objects/classobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/classobject.c b/Objects/classobject.c
index 2415ed14cb1..f26a85c6237 100644
--- a/Objects/classobject.c
+++ b/Objects/classobject.c
@@ -110,7 +110,7 @@ PyMethod_New(PyObject *func, PyObject *self)
im->im_weakreflist = NULL;
Py_INCREF(func);
im->im_func = func;
- Py_XINCREF(self);
+ Py_INCREF(self);
im->im_self = self;
im->vectorcall = method_vectorcall;
_PyObject_GC_TRACK(im);