From: Tom Tromey Date: Tue, 18 Jun 2013 18:43:27 +0000 (+0000) Subject: * python/py-inferior.c (gdbpy_selected_inferior): Don't incref. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2d57700bef17e9d26002db304aa964a7c80080e9;p=binutils-gdb.git * python/py-inferior.c (gdbpy_selected_inferior): Don't incref. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c162970f3c3..0b5323ca2e3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +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 diff --git a/gdb/python/py-inferior.c b/gdb/python/py-inferior.c index a93677dabb0..26ee004349d 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