]> granicus.if.org Git - python/commitdiff
There is no reason for imp.get_magic() to return a mutable bytearray
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>
Thu, 24 Apr 2008 18:23:22 +0000 (18:23 +0000)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>
Thu, 24 Apr 2008 18:23:22 +0000 (18:23 +0000)
Python/import.c

index 5b96cea545938fd061006b44017c01c14be5a66e..8b11aadf6f7a268c24bb4acb6da88e1897e123f0 100644 (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 *