Skip to content

bpo-46323: _ctypes.CFuncPtr fails if _argtypes_ is too long#31188

Merged
vstinner merged 1 commit intopython:mainfrom
vstinner:ctypes_max_argcount
Feb 7, 2022
Merged

bpo-46323: _ctypes.CFuncPtr fails if _argtypes_ is too long#31188
vstinner merged 1 commit intopython:mainfrom
vstinner:ctypes_max_argcount

Conversation

@vstinner
Copy link
Copy Markdown
Member

@vstinner vstinner commented Feb 7, 2022

ctypes.CFUNCTYPE() and ctypes.WINFUNCTYPE() now fail to create the
type if its "argtypes" member contains too many arguments.
Previously, the error was only raised when calling a function.

Change also how CFUNCTYPE() and WINFUNCTYPE() handle KeyError to
prevent creating a chain of exceptions if ctypes.CFuncPtr raises an
error.

https://bugs.python.org/issue46323

ctypes.CFUNCTYPE() and ctypes.WINFUNCTYPE() now fail to create the
type if its "_argtypes_" member contains too many arguments.
Previously, the error was only raised when calling a function.

Change also how CFUNCTYPE() and WINFUNCTYPE() handle KeyError to
prevent creating a chain of exceptions if ctypes.CFuncPtr raises an
error.
@corona10
Copy link
Copy Markdown
Member

corona10 commented Feb 8, 2022

@vstinner

Please check https://bugs.python.org/msg412806

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants