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

add as_ptr and into_ptr inherent methods #3359

Merged
merged 1 commit into from Aug 11, 2023

Conversation

davidhewitt
Copy link
Member

Ref #3325.

Adds as_ptr and into_ptr methods to Py, PyAny, PyRef, and PyRefMut.

Between these four types, we can bin off a significant amount of PyO3's internal usage of AsPyPointer and IntoPyPointer, and this is probably also true for downstream.

Future PRs can figure out the remaining APIs which interact with these traits.

src/instance.rs Outdated Show resolved Hide resolved
src/types/any.rs Outdated Show resolved Hide resolved
src/instance.rs Outdated Show resolved Hide resolved
@davidhewitt davidhewitt force-pushed the py-pointer-methods branch 2 times, most recently from ea52298 to 849d3c2 Compare July 31, 2023 06:34
@davidhewitt davidhewitt added this pull request to the merge queue Aug 11, 2023
Merged via the queue into PyO3:main with commit a541925 Aug 11, 2023
32 checks passed
@davidhewitt davidhewitt deleted the py-pointer-methods branch August 11, 2023 20:34
alex added a commit to alex/pyo3 that referenced this pull request Aug 14, 2023
it wasn't used in any public APIs following PyO3#3359
@alex alex mentioned this pull request Aug 14, 2023
alex added a commit to alex/pyo3 that referenced this pull request Aug 14, 2023
it wasn't used in any public APIs following PyO3#3359
alex added a commit to alex/pyo3 that referenced this pull request Aug 14, 2023
it wasn't used in any public APIs following PyO3#3359
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.

None yet

3 participants