← 输入框|bugs.python.org|刷新

➜

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.

作者 hoodchatham
收信人 hoodchatham
日期 2022-04-04.00:27:44
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1649032064.63.0.517222199646.issue47208@roundup.psfhosted.org>
In-reply-to
内容
ctypes defines `CTYPES_MAX_ARGCOUNT` to be 1024:
https://github.com/python/cpython/blob/6db2db91b96aaa1270c200ec931a2250fe2799c7/Modules/_ctypes/ctypes.h#L21

If a function call is attempted with more than 1024 arguments, it will fail. The libffi emscripten port github.com/hoodmane/libffi-emscripten can only support function calls with at most 122 arguments due to limitations in Emscripten / Wasm:
https://github.com/emscripten-core/emscripten/pull/16653

I propose to allow the libffi port to define FFI_MAX_CLOSURE_ARGS and if this is defined then use this number instead for `CTYPES_MAX_ARGCOUNT`.
https://github.com/libffi/libffi/issues/703

The test `test_callback_too_many_args` should also be updated to respect the value of `CTYPES_MAX_ARGCOUNT` rather than hardcoding 1024 into the test.
历史
日期 用户 动作 参数
2022-04-04 00:27:44hoodchatham修改recipients: + hoodchatham
2022-04-04 00:27:44hoodchatham修改messageid: <1649032064.63.0.517222199646.issue47208@roundup.psfhosted.org>
2022-04-04 00:27:44hoodchatham链接issue47208 messages
2022-04-04 00:27:44hoodchatham创建