diff --git a/Misc/NEWS.d/next/Core and Builtins/2019-06-16-02-38-25.bpo-37300.WJkgKV.rst b/Misc/NEWS.d/next/Core and Builtins/2019-06-16-02-38-25.bpo-37300.WJkgKV.rst new file mode 100644 index 00000000000..aae278e8498 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2019-06-16-02-38-25.bpo-37300.WJkgKV.rst @@ -0,0 +1 @@ +Remove an unnecssary Py_XINCREF in classobject.c. 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);