mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-46841: Use a bytes
object for _co_code_adaptive
(GH-32205)
This commit is contained in:
parent
bd2e47c883
commit
ae9de82e32
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue