This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: fix ref counting in gdbpy_selected_inferior
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 18 Jun 2013 12:42:21 -0600
- Subject: Re: RFC: fix ref counting in gdbpy_selected_inferior
- References: <87wqqtl6o4 dot fsf at fleche dot redhat dot com>
>>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:
Tom> gdbpy_selected_inferior is double-counting its returned object.
Tom> This is obvious when you realize that inferior_to_inferior_object
Tom> returns a new reference.
Tom> This patch fixes the problem by removing an incref.
Tom> Built and regtested on x86-64 Fedora 18.
Tom> * python/py-inferior.c (gdbpy_selected_inferior): Don't incref.
I'm checking this in now.
Tom