Skip to content

Refactor and Export Pyobject_* macros#155

Merged
konstin merged 2 commits intomasterfrom
pyobject_macros
May 13, 2018
Merged

Refactor and Export Pyobject_* macros#155
konstin merged 2 commits intomasterfrom
pyobject_macros

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?

konstin added 2 commits May 7, 2018 23:45
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants