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

gh-107137: Add _PyTuple_NewNoTrack() internal C API #107183

Closed
wants to merge 1 commit into from

Commits on Jul 24, 2023

  1. pythongh-107137: Add _PyTuple_NewNoTrack() internal C API

    Fix a crash in PySequence_Tuple() when the tuple which is being
    initialized was accessed via GC introspection, like the
    gc.get_referrers() function. Now the function only tracks the tuple
    by the GC once it's fully initialized.
    
    Add _PyTuple_NewNoTrack() and _PyTuple_ResizeNoTrack() functions to
    the internal C API: similar to PyTuple_New() and _PyTuple_Resize(),
    but don't track the tuple by the GC.
    
    Modify PySequence_Tuple() to use these functions.
    vstinner committed Jul 24, 2023
    Configuration menu
    Copy the full SHA
    55d1b7a View commit details
    Browse the repository at this point in the history