]> granicus.if.org Git - python/commitdiff
closes bpo-37300: Remove unnecessary Py_XINCREF in classobject.c. (GH-14120)
authorHai Shi <shihai1992@gmail.com>
Sun, 16 Jun 2019 20:19:19 +0000 (04:19 +0800)
committerBenjamin Peterson <benjamin@python.org>
Sun, 16 Jun 2019 20:19:19 +0000 (13:19 -0700)
Misc/NEWS.d/next/Core and Builtins/2019-06-16-02-38-25.bpo-37300.WJkgKV.rst [new file with mode: 0644]
Objects/classobject.c

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 (file)
index 0000000..aae278e
--- /dev/null
@@ -0,0 +1 @@
+Remove an unnecssary Py_XINCREF in classobject.c.
index 2415ed14cb1506c406e4bd2474a6b82c57196230..f26a85c62371fd5e971adcc4a3b9ed15aaef6a2b 100644 (file)
@@ -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);