bpo-34603: Fix returning structs from functions by vladima · Pull Request #9258 · python/cpython (original) (raw)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Oh, I'm sorry, I didn't notice that each additional tested size requires to write a long C code in _ctypes_test.c. IMHO it's not worth it and adds too much maintenance burden. I was concerned about a special case for size=16 bytes, but again, I don't think that it's worth it.

Would you mind to remove tests for 11..20, so only test 1..10? So we cover all special cases on 64-bit + size 9 and size 10 -- just in case.