summaryrefslogtreecommitdiffstats
path: root/Python/peephole.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-05-26 13:28:38 (GMT)
committerChristian Heimes <christian@cheimes.de>2008-05-26 13:28:38 (GMT)
commit72b710a59617ebe6dd1c41613d2c7eb81702efd9 (patch)
treecd134cc11c49ba09f50e44a9f36b69f2b0ffc893 /Python/peephole.c
parent9c4756ea265b5ebd71c9ae59f3673c7cecb6f060 (diff)
downloadcpython-72b710a59617ebe6dd1c41613d2c7eb81702efd9.zip
cpython-72b710a59617ebe6dd1c41613d2c7eb81702efd9.tar.gz
cpython-72b710a59617ebe6dd1c41613d2c7eb81702efd9.tar.bz2
Renamed PyString to PyBytes
Diffstat (limited to 'Python/peephole.c')
-rw-r--r--Python/peephole.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/Python/peephole.c b/Python/peephole.c
index db5ca33..30789e4 100644
--- a/Python/peephole.c
+++ b/Python/peephole.c
@@ -325,15 +325,15 @@ PyCode_Optimize(PyObject *code, PyObject* consts, PyObject *names,
goto exitUnchanged;
/* Bypass optimization when the lineno table is too complex */
- assert(PyString_Check(lineno_obj));
- lineno = (unsigned char*)PyString_AS_STRING(lineno_obj);
- tabsiz = PyString_GET_SIZE(lineno_obj);
+ assert(PyBytes_Check(lineno_obj));
+ lineno = (unsigned char*)PyBytes_AS_STRING(lineno_obj);
+ tabsiz = PyBytes_GET_SIZE(lineno_obj);
if (memchr(lineno, 255, tabsiz) != NULL)
goto exitUnchanged;
/* Avoid situations where jump retargeting could overflow */
- assert(PyString_Check(code));
- codelen = PyString_GET_SIZE(code);
+ assert(PyBytes_Check(code));
+ codelen = PyBytes_GET_SIZE(code);
if (codelen > 32700)
goto exitUnchanged;
@@ -342,7 +342,7 @@ PyCode_Optimize(PyObject *code, PyObject* consts, PyObject *names,
if (codestr == NULL)
goto exitUnchanged;
codestr = (unsigned char *)memcpy(codestr,
- PyString_AS_STRING(code), codelen);
+ PyBytes_AS_STRING(code), codelen);
/* Verify that RETURN_VALUE terminates the codestring. This allows
the various transformation patterns to look ahead several
@@ -632,7 +632,7 @@ PyCode_Optimize(PyObject *code, PyObject* consts, PyObject *names,
}
assert(h + nops == codelen);
- code = PyString_FromStringAndSize((char *)codestr, h);
+ code = PyBytes_FromStringAndSize((char *)codestr, h);
PyMem_Free(addrmap);
PyMem_Free(codestr);
PyMem_Free(blocks);