den-run-ai / ctypesgen

Automatically exported from code.google.com/p/ctypesgen
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Support gcc __attribute__((__packed__)) #46

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This tool works like a charm, my only issue is that packed data structures does 
not get recognised.

The .c file:
struct __attribute__((__packed__)) {

Should become:

class struct_something(Structure):
    __pack__ = 1
    pass

In the .py file. Ctypes already have support for this. So i guess it's a simple 
matter of finding the attribute in the parser.

Original issue reported on code.google.com by johan.de...@gmail.com on 10 Oct 2013 at 1:26

GoogleCodeExporter commented 9 years ago
I just want to bump this issue. This is still a badly needed feature.

Original comment by johan.de...@gmail.com on 7 Nov 2014 at 7:24