Will therefore GDB utilize C++ or not?
Tom Tromey
tromey@redhat.com
Fri May 18 20:07:00 GMT 2012
>>>>> "Paul" == <Paul_Koning@Dell.com> writes:
Tom> We'd use RAII to ensure that refcounts were automatically managed
Tom> by the C++ compiler.
Paul> That would be nice if the Python ABI is compatible with this. It may
Paul> not be, or not always. For example, when some calls steal a reference
Paul> while others (most of them) don't, and some return a borrowed
Paul> reference while others return a new one, it isn't clear how a
Paul> mechanical scheme like RAII will give you a full answer.
I think you can write wrapper functions which abstract the details.
We'd want this anyway so we can turn Python exceptions into C++
exceptions.
boost::python basically does all this already, but I've been assuming
we'd roll our own.
Paul> Maybe if you use only the subset that does reference counting in
Paul> the one way you want it done? There would be some performance
Paul> impact but probably not much.
I think the wrappers would be pretty thin, and there'd be no runtime hit
to speak of.
Tom
More information about the Gdb
mailing list