From ae0b088f6ca4156e7f8ee32fda0264f676f3d6b3 Mon Sep 17 00:00:00 2001 From: Amaury Forgeot d'Arc Date: Thu, 24 Apr 2008 18:23:22 +0000 Subject: [PATCH] There is no reason for imp.get_magic() to return a mutable bytearray --- Python/import.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/import.c b/Python/import.c index 5b96cea5459..8b11aadf6f7 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 *