Skip to content

add as_ptr and into_ptr inherent methods#3359

Merged
davidhewitt merged 1 commit intoPyO3:mainfrom
davidhewitt:py-pointer-methods
Aug 11, 2023
Merged

add as_ptr and into_ptr inherent methods#3359
davidhewitt merged 1 commit intoPyO3:mainfrom
davidhewitt:py-pointer-methods

Conversation

@davidhewitt
Copy link
Copy Markdown
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.

@davidhewitt davidhewitt force-pushed the py-pointer-methods branch 2 times, most recently from d4028bc to 9274667 Compare July 30, 2023 21:03
@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
@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.

3 participants