* python/py-evts.c (gdbpy_initialize_py_events): Don't
authorTom Tromey <tromey@redhat.com>
Mon, 20 May 2013 20:34:11 +0000 (20:34 +0000)
committerTom Tromey <tromey@redhat.com>
Mon, 20 May 2013 20:34:11 +0000 (20:34 +0000)
incref the module.

gdb/ChangeLog
gdb/python/py-evts.c

index 4dea044c9d564cb4e20811b4f523180115f8f831..ed139fde35f253b7150a0b4b94f85d10c19c8268 100644 (file)
@@ -1,3 +1,8 @@
+2013-05-20  Tom Tromey  <tromey@redhat.com>
+
+       * python/py-evts.c (gdbpy_initialize_py_events): Don't
+       incref the module.
+
 2013-05-20  Tom Tromey  <tromey@redhat.com>
 
        * python/python.c (gdbpy_run_events): Decref the result
index bb384e378b66e245d860c6c1832dc330b43b7ca8..4828bdad919847027903e19809271724e259c067 100644 (file)
@@ -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)