Passing a packed C structure to a c module
Philippe Martin
pmartin at snakecard.com
Fri Apr 14 12:44:59 EDT 2006
Thanks,
It's a pretty big structure: painfull to pass each item as a param.
Regards,
Philippe
"Martin v. Löwis" wrote:
> Philippe Martin wrote:
>> Is it possible to define a packed C structure in python and pass it to
>> the c module, or should the wrapper do that ?
>
> You can create a packed structure using string concatenation, and with
> the help of the struct module. However, this gives you a string object
> in the end, which you still need to pass into your C library.
>
> It is better to fill the struct in the wrapper.
>
> Regards,
> Martin
More information about the Python-list
mailing list