New issue 17 by mozbug...@gmail.com: Failed to parse real anonymous field
in struct.
http://code.google.com/p/ctypesgen/issues/detail?id=17
For code like this:
typedef struct SteamState_struct{
char region;
union{
int R1;
long int R4;
float R2;
double R3;
};
} SteamState;
the union part will be discarded. If I give the union a name like 'rvalue',
the union will be generated properly.
The same is true for anonymous enum inside struct.
ctypes Structure class has a special attribute for _anonymous_.
This seems to be a C11 feature. Before C11, it's a gcc extension.
Attached patch make the anonymous fields available. anonymous field will
have its name as `null` in json.
Attachments:
ctypesgen-anonymous-field.patch 3.2 KB
Comment #2 on issue 17 by r...@sc3d.org: Failed to parse real anonymous
field in struct.
http://code.google.com/p/ctypesgen/issues/detail?id=17
Thanks; committed.