summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Objects/codeobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/codeobject.c b/Objects/codeobject.c
index 987cdef..7d50b40 100644
--- a/Objects/codeobject.c
+++ b/Objects/codeobject.c
@@ -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 *