mirror of https://github.com/python/cpython
bpo-46841: Use a `bytes` object for `_co_code_adaptive` (GH-32205)
This commit is contained in:
parent
bd2e47c883
commit
ae9de82e32
|
@ -1523,8 +1523,8 @@ code_getfreevars(PyCodeObject *code, void *closure)
|
|||
static PyObject *
|
||||
code_getcodeadaptive(PyCodeObject *code, void *closure)
|
||||
{
|
||||
return PyMemoryView_FromMemory(code->co_code_adaptive, _PyCode_NBYTES(code),
|
||||
PyBUF_READ);
|
||||
return PyBytes_FromStringAndSize(code->co_code_adaptive,
|
||||
_PyCode_NBYTES(code));
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
|
|
Loading…
Reference in New Issue