define `PyObject_GC_Track` and `PyObject_GC_UnTrack` for PyPy by davidhewitt · Pull Request #6299 · PyO3/pyo3 · GitHub
Skip to content

define PyObject_GC_Track and PyObject_GC_UnTrack for PyPy - #6299

Merged
davidhewitt merged 4 commits into
PyO3:mainfrom
davidhewitt:pypy-gc-untrack
Aug 6, 2026
Merged

davidhewitt merged 4 commits into
PyO3:mainfrom
davidhewitt:pypy-gc-untrack

Conversation

@davidhewitt

Copy link
Copy Markdown
Member

PyPy defines these functions as macros that expand to no-ops; by doing the same we make it easier for downstream code to not have to be conditional on PyPy.

https://github.com/pypy/pypy/blob/194f9f44b50552d75484d67cda6e2b36607dee0c/pypy/module/cpyext/include/objimpl.h#L178-L190

@mejrs mejrs left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PyPy defines these functions as macros that expand to no-ops

Can you add this as (doc) comments on these definitions as well?

LGTM otherwise.

Comment thread src/impl_/pyclass.rs
Comment thread pyo3-ffi/src/objimpl.rs Outdated
@davidhewitt
davidhewitt added this pull request to the merge queue Aug 6, 2026
Merged via the queue into PyO3:main with commit 51dcc7d Aug 6, 2026
50 checks passed
@davidhewitt
davidhewitt deleted the pypy-gc-untrack branch August 6, 2026 10:01
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.

4 participants