This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ronaldoussoren
Recipients Ayappan, BTaskaya, David.Edelsohn, Michael.Felt, T.Rex, ronaldoussoren
Date 2020-08-03.07:35:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1596440124.61.0.561625297783.issue38628@roundup.psfhosted.org>
In-reply-to
Content
Thanks for the code reference.

I'm not a ctypes expert, but do maintain another project using libffi. The comment in stgdict.c is correct, and that code is used for all platforms.

However, code to embed arrays into a struct (as described int the comment) is only used for structs with a size smaller than 16 bytes (MAX_STRUCT_SIZE), which AFAIK is not correct.  My other project does something similar, but for all struct sizes.

That said, I haven't studied the ctypes code in detail yet.

As a quick test you could check if increasing MAX_STRUCT_SIZE to (say) 32 fixes this particular example.
History
Date User Action Args
2020-08-03 07:35:24ronaldoussorensetrecipients: + ronaldoussoren, David.Edelsohn, Michael.Felt, Ayappan, BTaskaya, T.Rex
2020-08-03 07:35:24ronaldoussorensetmessageid: <1596440124.61.0.561625297783.issue38628@roundup.psfhosted.org>
2020-08-03 07:35:24ronaldoussorenlinkissue38628 messages
2020-08-03 07:35:24ronaldoussorencreate