Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ctypes _as_parameter_ does not mention all possible types #107442

Closed
tomasr8 opened this issue Jul 29, 2023 · 1 comment
Closed

ctypes _as_parameter_ does not mention all possible types #107442

tomasr8 opened this issue Jul 29, 2023 · 1 comment
Labels
docs Documentation in the Doc dir

Comments

@tomasr8
Copy link
Member

tomasr8 commented Jul 29, 2023

Documentation

The _as_parameter_ attribute can be used when one wants to pass a custom object a ctypes function.
The documentation says:

it must be one of integer, string, or bytes

However, one can also use a ctypes instance or another object which itself has the _as_parameter_ attribute.
The documentation should be updated to include these two additional possibilities.

Linked PRs

@tomasr8 tomasr8 added the docs Documentation in the Doc dir label Jul 29, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Aug 7, 2023
…ythonGH-107443)

(cherry picked from commit 6925c57)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
Yhg1s pushed a commit that referenced this issue Aug 7, 2023
…H-107443) (#107707)

gh-107442: Document all valid types for ctypes _as_parameter_ (GH-107443)
(cherry picked from commit 6925c57)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
erlend-aasland pushed a commit that referenced this issue Aug 7, 2023
GH-107443) (#107718)

(cherry picked from commit 6925c57)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
@hugovk
Copy link
Member

hugovk commented Nov 10, 2023

Thanks for the fix!

@hugovk hugovk closed this as completed Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

No branches or pull requests

2 participants