This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: fix ref counting in gdbpy_selected_inferior


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]