aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-06-18 18:43:27 +0000
committerTom Tromey <tromey@redhat.com>2013-06-18 18:43:27 +0000
commit2d57700bef17e9d26002db304aa964a7c80080e9 (patch)
treeb10c462cad4e0562696662bcafe1d699cd42a61f /gdb
parentac47519148406c07c968732b83bdf7f7b272d15c (diff)
downloadgdb-2d57700bef17e9d26002db304aa964a7c80080e9.zip
gdb-2d57700bef17e9d26002db304aa964a7c80080e9.tar.gz
gdb-2d57700bef17e9d26002db304aa964a7c80080e9.tar.bz2
* python/py-inferior.c (gdbpy_selected_inferior): Don't incref.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/python/py-inferior.c7
2 files changed, 5 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c162970..0b5323c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
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
'pythondir' on failure path as well.
diff --git a/gdb/python/py-inferior.c b/gdb/python/py-inferior.c
index a93677d..26ee004 100644
--- a/gdb/python/py-inferior.c
+++ b/gdb/python/py-inferior.c
@@ -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