From 2d57700bef17e9d26002db304aa964a7c80080e9 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 18 Jun 2013 18:43:27 +0000 Subject: * python/py-inferior.c (gdbpy_selected_inferior): Don't incref. --- gdb/ChangeLog | 4 ++++ gdb/python/py-inferior.c | 7 +------ 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'gdb') 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 + * python/py-inferior.c (gdbpy_selected_inferior): Don't incref. + +2013-06-18 Tom Tromey + * 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 -- cgit v1.1