Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

gh-84436: Immortalize in _PyStructSequence_InitBuiltinWithFlags() #104054

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

Merged
Prev Previous commit
Fix _PyStructSequence_FiniBuiltin().
  • Loading branch information
ericsnowcurrently committed May 1, 2023
commit 2abdc7931b2a031ebd324ce83d238a7bba8e6847
9 changes: 3 additions & 6 deletions 9 Objects/structseq.c
Original file line number Diff line number Diff line change
Expand Up @@ -620,16 +620,13 @@ _PyStructSequence_FiniBuiltin(PyTypeObject *type)
return;
}

_PyStaticType_Dealloc(type);

// Undo _PyStructSequence_InitBuiltinWithFlags().
type->tp_name = NULL;
PyMem_Free(type->tp_members);
type->tp_members = NULL;

_PyStaticType_Dealloc(type);

// Make sure that _PyStructSequence_InitBuiltinWithFlags()
// will initialize the type again.
assert(type->tp_name == NULL);
type->tp_base = NULL;
}


Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.