mirror of
https://github.com/python/cpython.git
synced 2024-11-26 11:24:40 +08:00
There is no reason for imp.get_magic() to return a mutable bytearray
This commit is contained in:
parent
be5229ec04
commit
ae0b088f6c
@ -2686,7 +2686,7 @@ imp_get_magic(PyObject *self, PyObject *noargs)
|
||||
buf[2] = (char) ((pyc_magic >> 16) & 0xff);
|
||||
buf[3] = (char) ((pyc_magic >> 24) & 0xff);
|
||||
|
||||
return PyBytes_FromStringAndSize(buf, 4);
|
||||
return PyString_FromStringAndSize(buf, 4);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
|
Loading…
Reference in New Issue
Block a user