diff options
author | Guido van Rossum <guido@python.org> | 2021-06-21 13:53:04 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-21 13:53:04 -0700 |
commit | 355f5dd36a0f53175517f35798aa874564d1113a (patch) | |
tree | cfc6c7e4f009afc772d4a9e0c909d6e3499cf2e9 /Include/cpython/code.h | |
parent | c5d700f0e2e2921c6b54c72ffb0fca3c3d1ef06b (diff) | |
download | cpython-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 'Include/cpython/code.h')
-rw-r--r-- | Include/cpython/code.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/Include/cpython/code.h b/Include/cpython/code.h index 5bf4c8c15d..77801dc173 100644 --- a/Include/cpython/code.h +++ b/Include/cpython/code.h @@ -26,9 +26,6 @@ typedef uint16_t _Py_CODEUNIT; typedef struct _PyOpcache _PyOpcache; -typedef unsigned char _PyLocalsPlusKind; -typedef _PyLocalsPlusKind *_PyLocalsPlusKinds; - /* Bytecode object */ struct PyCodeObject { PyObject_HEAD @@ -75,7 +72,7 @@ struct PyCodeObject { int co_firstlineno; /* first source line number */ PyObject *co_code; /* instruction opcodes */ PyObject *co_localsplusnames; /* tuple mapping offsets to names */ - _PyLocalsPlusKinds co_localspluskinds; /* array mapping to local kinds */ + PyObject *co_localspluskinds; /* Bytes mapping to local kinds (one byte per variable) */ PyObject *co_filename; /* unicode (where it was loaded from) */ PyObject *co_name; /* unicode (name, for reference) */ PyObject *co_linetable; /* string (encoding addr<->lineno mapping) See @@ -222,4 +219,3 @@ void PyLineTable_InitAddressRange(const char *linetable, Py_ssize_t length, int int PyLineTable_NextAddressRange(PyCodeAddressRange *range); int PyLineTable_PreviousAddressRange(PyCodeAddressRange *range); - |