From 2d57700bef17e9d26002db304aa964a7c80080e9 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 18 Jun 2013 18:43:27 +0000 Subject: [PATCH] * 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(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c162970f3c..0b5323ca2e 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 a93677dabb..26ee004349 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