* python/py-inferior.c (gdbpy_selected_inferior): Don't incref.
authorTom Tromey <tromey@redhat.com>
Tue, 18 Jun 2013 18:43:27 +0000 (18:43 +0000)
committerTom Tromey <tromey@redhat.com>
Tue, 18 Jun 2013 18:43:27 +0000 (18:43 +0000)
gdb/ChangeLog
gdb/python/py-inferior.c

index c162970f3c3034db110fa5d7ae6d405c7a0af6a8..0b5323ca2e32c5b811523f84d9b6198eb762f507 100644 (file)
@@ -1,3 +1,7 @@
+2013-06-18  Tom Tromey  <tromey@redhat.com>
+
+       * python/py-inferior.c (gdbpy_selected_inferior): Don't incref.
+
 2013-06-18  Tom Tromey  <tromey@redhat.com>
 
        * python/python.c (finish_python_initialization): Decref
index a93677dabb0c8fa7ad6fc7ff124e19f06aa5476a..26ee004349dc7b88e8f665400457b2f7b1d03d01 100644 (file)
@@ -773,12 +773,7 @@ py_free_inferior (struct inferior *inf, void *datum)
 PyObject *
 gdbpy_selected_inferior (PyObject *self, PyObject *args)
 {
-  PyObject *inf_obj;
-
-  inf_obj = inferior_to_inferior_object (current_inferior ());
-  Py_INCREF (inf_obj);
-
-  return inf_obj;
+  return inferior_to_inferior_object (current_inferior ());
 }
 
 int