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 PR python/14387


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


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