From: Amaury Forgeot d'Arc Date: Thu, 24 Apr 2008 18:23:22 +0000 (+0000) Subject: There is no reason for imp.get_magic() to return a mutable bytearray X-Git-Tag: v3.0a5~70 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae0b088f6ca4156e7f8ee32fda0264f676f3d6b3;p=thirdparty%2FPython%2Fcpython.git There is no reason for imp.get_magic() to return a mutable bytearray --- diff --git a/Python/import.c b/Python/import.c index 5b96cea54593..8b11aadf6f7a 100644 --- a/Python/import.c +++ b/Python/import.c @@ -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 *