diff options
author | Guido van Rossum <guido@python.org> | 2021-06-21 20:53:04 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-21 20:53:04 (GMT) |
commit | 355f5dd36a0f53175517f35798aa874564d1113a (patch) | |
tree | cfc6c7e4f009afc772d4a9e0c909d6e3499cf2e9 /Objects/frameobject.c | |
parent | c5d700f0e2e2921c6b54c72ffb0fca3c3d1ef06b (diff) | |
download | cpython-355f5dd36a0f53175517f35798aa874564d1113a.zip cpython-355f5dd36a0f53175517f35798aa874564d1113a.tar.gz cpython-355f5dd36a0f53175517f35798aa874564d1113a.tar.bz2 |
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/frameobject.c')
-rw-r--r-- | Objects/frameobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/frameobject.c b/Objects/frameobject.c index f9090d8..813ec56 100644 --- a/Objects/frameobject.c +++ b/Objects/frameobject.c @@ -958,7 +958,7 @@ PyFrame_FastToLocalsWithError(PyFrameObject *f) co = _PyFrame_GetCode(f); fast = f->f_localsptr; for (int i = 0; i < co->co_nlocalsplus; i++) { - _PyLocalsPlusKind kind = co->co_localspluskinds[i]; + _PyLocals_Kind kind = _PyLocals_GetKind(co->co_localspluskinds, i); /* If the namespace is unoptimized, then one of the following cases applies: @@ -1052,7 +1052,7 @@ PyFrame_LocalsToFast(PyFrameObject *f, int clear) PyErr_Fetch(&error_type, &error_value, &error_traceback); for (int i = 0; i < co->co_nlocalsplus; i++) { - _PyLocalsPlusKind kind = co->co_localspluskinds[i]; + _PyLocals_Kind kind = _PyLocals_GetKind(co->co_localspluskinds, i); /* Same test as in PyFrame_FastToLocals() above. */ if (kind & CO_FAST_FREE && !(co->co_flags & CO_OPTIMIZED)) { |