This is the mail archive of the 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] Strings and arrays without malloc

On Wed, 2008-03-12 at 23:19 -0600, Tom Tromey wrote:
> my current thinking is that the general approach
> should be to write a thin binding, and then add a nicer OO API in pure
> python.  I'm not a python person though, so maybe this is weird.

I see two possible approaches here:

1. Yours: expose a procedural layer to python, and build an OO API on
top of it, using Python itself. This has the advantage of keeping the C
<-> Python glue simple, but you would have to maintain code in two
languages (maybe not a problem).

2. Create new types (using Python's C API) to represent the classes we
want to expose to Python. All of the implementation would be in C, then.
The glue would be more complicated (but maybe not much more
complicated), but then the implementation is all in one language, and in
one place.

Last night I started to experiment creating an OO API for values, using
Volodya's branch. I chose to use approach 2, but I didn't really make my
mind yet. If it turns out that it really isn't much more complicated
than 1, then I think I prefer to have it all in one language.

> Opinions, advice, encouragement, etc ... all welcome.  At times I
> suspect that nobody is reading this.

I think there are lots of eyes on this Python support thing, including
mine. :-)

I'm starting to put some hands on it too, FWIW.
Thiago Jung Bauermann
Software Engineer
IBM Linux Technology Center

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