gh-104533: Fix @ctypes.util.struct with endian#154038
Conversation
Change _fields_ type to a list of tuples, instead of a list of lists. Modify test.test_ctypes.test_aligned_structures to test also @ctypes.util.struct decorator.
|
Union classes created with |
Later, it would be interesting to add |
Agreed. I had left it out of the original PR because it seemed like there was less demand for it, but I'd be happy to review a PR or contribute it myself. |
|
|
||
| fields.append(field) | ||
| # _fields_ is a list of tuples | ||
| fields.append(tuple(field)) |
There was a problem hiding this comment.
If we get take_tuple in 3.16, we should switch to that here :)
|
Merged, thanks for the review. |
|
https://buildbot.python.org/#/builders/1609/builds/6406 Likely caused by this or one of the other recent |
|
It was caused by a combination of PRs. Victor already has a fix up. |
Sorry for the noise. It has already been fixed by #154091. |
Change
_fields_type to a list of tuples, instead of a list of lists.Modify test.test_ctypes.test_aligned_structures to test also
@ctypes.util.structdecorator.