Closed vallsv closed 3 years ago
Hi,
Thank you for your feedback. It was a bug in castxml, where the members of the "nested struct" (test1_1) was removed from the produced xml output. I have pycparser to use a different castxml output format that seems to do the trick. It might have unforseen side effects, but all unit tests pass using the new format.
Please try version 0.7.0 of pycstruct.
Regarding named tuples. This seems to be an interesting idea. As you write it would look more like using structs in the c language. However, I'm not sure how to handle unions with named tuples.
Thanks a lot. It works perfectly now.
Concerning named tuple, i will open other issue.
Hi,
Thanks a lot for this lib. It saves me a lot of time :-)
I was working on a huge data structure used by a file format. Part of the description is using nested structs.
The parsing of such structure is fine, but it looks like there is no data in the end.
Tested with pycstruct 0.6.1
It's quite easy to refactor the c header definition to make it work, but you maybe care about this nested struct too?
Test
Result
While i am here, another small question: Have you think about named tuple for the result? So what it really could be reused like struct without string indexing. And should also use less memory.