This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 22/28] remove erroneous incref from gdbpy_initialize_py_events
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 19 Apr 2013 08:41:18 -0600
- Subject: [PATCH 22/28] remove erroneous incref from gdbpy_initialize_py_events
- References: <87ehe638ww dot fsf at fleche dot redhat dot com>
The checker noticed a bogus incref in gdbpy_initialize_py_events.
* python/py-evts.c (gdbpy_initialize_py_events): Don't
incref the module.
---
gdb/python/py-evts.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/gdb/python/py-evts.c b/gdb/python/py-evts.c
index bb384e3..4828bda 100644
--- a/gdb/python/py-evts.c
+++ b/gdb/python/py-evts.c
@@ -81,9 +81,6 @@ gdbpy_initialize_py_events (void)
if (add_new_registry (&gdb_py_events.new_objfile, "new_objfile") < 0)
return -1;
-#ifndef IS_PY3K
- Py_INCREF (gdb_py_events.module);
-#endif
if (PyModule_AddObject (gdb_module,
"events",
(PyObject *) gdb_py_events.module) < 0)
--
1.8.1.4