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

Pass API-mode function wrappers to places that expect a cdata pointer #42

Merged
merged 3 commits into from
Dec 20, 2023
Merged

Conversation

arigo
Copy link
Contributor

@arigo arigo commented Dec 20, 2023

Writing fn = lib.myfunc in API mode gets a special kind of object optimized for performance (both on CPython and PyPy). With this change, this object can be passed around to more places where a regular <cdata> object was expected. This makes it easier to pass it as callback to other C functions, for example.

@arigo arigo merged commit 758a88f into python-cffi:main Dec 20, 2023
60 checks passed
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.

1 participant