This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: fix PR python/14387
- From: Phil Muldoon <pmuldoon at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 06 Aug 2012 11:03:36 +0100
- Subject: Re: RFC: fix PR python/14387
- References: <87vch2v7z2.fsf@fleche.redhat.com>
On 08/01/2012 06:26 PM, Tom Tromey wrote:
This patch looks fine to me, but I was pondering fixed lines like:
> - if (exit_code
> - && evpy_add_attribute (exited_event,
> - "exit_code",
> - PyLong_FromLongLong (*exit_code)) < 0)
> - goto fail;
Could these be caught with the ARI system? Transient references like
these will, I guess, in most cases, almost always leak a reference.
And in cases where the API returns a borrowed or stolen reference it
might be no trouble to explicitly assign it to a variable for
readability.
What do you think? I believe the ARI system only works with patches
going in now?
Cheers,
Phil