8000 bpo-43693: Turn localspluskinds into an object by gvanrossum · Pull Request #26749 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-43693: Turn localspluskinds into an object #26749

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
merged 12 commits into from
Jun 21, 2021
Merged
Prev Previous commit
Next Next commit
Use PyBytes_AsString instead of PyBytes_AS_STRING
(But still I get a crash in _freeze_importlib)
  • Loading branch information
gvanrossum committed Jun 15, 2021
commit 32cc42e34b57d05a1e634fbeeb7de934569ce381
4 changes: 2 additions & 2 deletions Include/internal/pycore_code.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,13 @@ typedef unsigned char _PyLocals_Kind;
static inline _PyLocals_Kind
_PyLocals_GetKind(PyObject *kinds, int i)
{
return ((_PyLocals_Kind *)PyBytes_AS_STRING(kinds))[i];
return ((_PyLocals_Kind *)PyBytes_AsString(kinds))[i];
}

static inline void
_PyLocals_SetKind(PyObject *kinds, int i, _PyLocals_Kind kind)
{
((_PyLocals_Kind *)PyBytes_AS_STRING(kinds))[i] = kind;
((_PyLocals_Kind *)PyBytes_AsString(kinds))[i] = kind;
}


Expand Down
0