diff options
-rw-r--r-- | Misc/NEWS.d/next/Core and Builtins/2019-06-16-02-38-25.bpo-37300.WJkgKV.rst | 1 | ||||
-rw-r--r-- | Objects/classobject.c | 2 |
2 files changed, 2 insertions, 1 deletions
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 0000000000..aae278e849 --- /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 2415ed14cb..f26a85c623 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); |