Extending Python with C or C++

Thomas Heller theller at python.net
Thu Jan 8 18:29:16 CET 2009


Nick Craig-Wood schrieb:
> Thomas Heller <theller at python.net> wrote:
>>  Nick Craig-Wood schrieb:
>> > Interesting - I didn't know about h2xml and xml2py before and I've
>> > done lots of ctypes wrapping!  Something to help with the initial
>> > drudge work of converting the structures would be very helpful.
>> > 
>> > ( http://pypi.python.org/pypi/ctypeslib/ )
>> > 
>> > I gave it a quick go and it worked fine.  I had to edit the XML in one
>> > place to make it acceptable (removing a u from a hex number).
>> 
>>  If you are using a recent version of gccxml, then you should use the
>>  ctypeslib-gccxml-0.9 branch of ctypeslib instead of the trunk. (I should
>>  really merge the gccxml-0.9 branch into the trunk;-)
>> 
>>  If you are already using the branch and the XML file is not accepted,
>>  then could you please provide a short C code snippet that reproduces
>>  the problem so that I can fix it?
> 
> I'm using gccxml from debian testing 0.9.0+cvs20080525-1 which I guess
> doesn't have the code from the branch in.

I meant the branch in the repository where ctypeslib lives in.
Anyway, it doesn't matter anymore since I merged that branch
into the ctypeslib trunk.

Now the problem with the 'u' suffix that you mentioned should be fixed, and
I also made a quick change so that the sized integer types from stdint.h are generated
correctly. So, please update your ctypeslib installation and trey again;-)

Thomas



More information about the Python-list mailing list