summaryrefslogtreecommitdiff
path: root/Objects/typeobject.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2021-06-21 13:53:04 -0700
committerGitHub <noreply@github.com>2021-06-21 13:53:04 -0700
commit355f5dd36a0f53175517f35798aa874564d1113a (patch)
treecfc6c7e4f009afc772d4a9e0c909d6e3499cf2e9 /Objects/typeobject.c
parentc5d700f0e2e2921c6b54c72ffb0fca3c3d1ef06b (diff)
downloadcpython-git-355f5dd36a0f53175517f35798aa874564d1113a.tar.gz
bpo-43693: Turn localspluskinds into an object (GH-26749)
Managing it as a bare pointer to malloc'ed bytes is just too awkward in a few places.
Diffstat (limited to 'Objects/typeobject.c')
-rw-r--r--Objects/typeobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index fbe3d165a6..3c766e9230 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -8864,7 +8864,7 @@ super_init_without_args(PyFrameObject *f, PyCodeObject *co,
PyObject *firstarg = f->f_localsptr[0];
// The first argument might be a cell.
- if (firstarg != NULL && (co->co_localspluskinds[0] & CO_FAST_CELL)) {
+ if (firstarg != NULL && (_PyLocals_GetKind(co->co_localspluskinds, 0) & CO_FAST_CELL)) {
// "firstarg" is a cell here unless (very unlikely) super()
// was called from the C-API before the first MAKE_CELL op.
if (f->f_lasti >= 0) {
@@ -8883,7 +8883,7 @@ super_init_without_args(PyFrameObject *f, PyCodeObject *co,
PyTypeObject *type = NULL;
int i = co->co_nlocals + co->co_nplaincellvars;
for (; i < co->co_nlocalsplus; i++) {
- assert((co->co_localspluskinds[i] & CO_FAST_FREE) != 0);
+ assert((_PyLocals_GetKind(co->co_localspluskinds, i) & CO_FAST_FREE) != 0);
PyObject *name = PyTuple_GET_ITEM(co->co_localsplusnames, i);
assert(PyUnicode_Check(name));
if (_PyUnicode_EqualToASCIIId(name, &PyId___class__)) {