8000 GH-95707: Fix uses of `Py_TPFLAGS_MANAGED_DICT` by markshannon · Pull Request #95854 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-95707: Fix uses of Py_TPFLAGS_MANAGED_DICT #95854

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
Next Next commit
Revert mistaken change.
  • Loading branch information
markshannon committed Aug 2, 2022
commit 1c1e488601925aa2d64490dfc97de60e6db1a37f
2 changes: 1 addition & 1 deletion Objects/typeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -3078,7 +3078,7 @@ type_new_descriptors(const type_new_ctx *ctx, PyTypeObject *type)
if (ctx->add_dict && ctx->base->tp_itemsize == 0) {
assert((type->tp_flags & Py_TPFLAGS_MANAGED_DICT) == 0);
type->tp_flags |= Py_TPFLAGS_MANAGED_DICT;
type->tp_dictoffset = -type->tp_basicsize - (Py_ssize_t)sizeof(PyObject *)*3;
type->tp_dictoffset = -slotoffset - (Py_ssize_t)sizeof(PyObject *)*3;
}

type->tp_basicsize = slotoffset;
Expand Down
0