There is no reason for imp.get_magic() to return a mutable bytearray

This commit is contained in:
Amaury Forgeot d'Arc 2008-04-24 18:23:22 +00:00
parent be5229ec04
commit ae0b088f6c

View File

@ -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 *