On Apr 20, 2009, at 7:17 AM, Dag Sverre Seljebotn wrote: > Sturla Molden wrote: >> On 4/19/2009 10:50 PM, Dag Sverre Seljebotn wrote: >> >>> Could we have some kind of keyword to define packed structs in >>> Cython? >>> This is not part of the C standard, but is supported in most C >>> compilers >>> through extensions. >> >> Since it's not in the standard, there is no standard syntax for this. >> >> But you can fake it using a char array and some constants storing >> offsets. > > Thanks, good idea. Indeed, since Cython would know the struct > definitions, > we could just directly output the necesarry pointer arithmetic :-)
I'd rather avoid such messiness in the C code if we can. +1 to being able to specify a packed keyword though. - Robert _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
