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

Refactor and Export Pyobject_* macros #155

Merged
merged 2 commits into from
May 13, 2018
Merged

Refactor and Export Pyobject_* macros #155

merged 2 commits into from
May 13, 2018

Conversation

konstin
Copy link
Member

@konstin konstin commented May 8, 2018

Sometimes you want to add other native types e.g. for https://github.com/termoshtt/rust-numpy. For those you need some conversions, which in pyo3 are implemented by macros. This pull request exports those macros so they are usable in other libraries. It also refactors the macros a bit, replacing calling pyobject_convert and pyobject_nativetype with a single pyobject_native_type.

@termoshtt Does this expose everything needed for rust-numpy?

This is required for interaction with other native python extensions, e.g. numpy

Fixes #153
termoshtt added a commit to PyO3/rust-numpy that referenced this pull request May 13, 2018
@termoshtt
Copy link

Thank for your rapid action :)
I've revise some macro export in #158 (which is PR for this PR). This revised macro works well with PyO3/rust-numpy#29, while I need some fix to remove py argument independent from the macro.

@konstin konstin merged commit 46b9bd6 into master May 13, 2018
althonos pushed a commit that referenced this pull request May 14, 2018
@konstin konstin deleted the pyobject_macros branch November 12, 2018 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants