This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 3/4] Change thread_to_thread_object to return a new reference
>>>>> "Tom" == Tom Tromey <tom@tromey.com> writes:
Tom> I think it is best to have a single style - returning NULL should also
Tom> set the Python exception.
Maybe the gdbpy_ref (1-argument) constructor and release methods could
assert that the Python exception is set if the underlying pointer is
NULL. That would not get full checking but maybe it would catch some
problems. And maybe we should simply use gdbpy_ref in many more places
in the Python layer -- ideally, reserve raw pointers solely for
parameters which are borrowed references.
Tom