This reverts r63675 based on the discussion in this thread:
http://mail.python.org/pipermail/python-dev/2008-June/079988.html
Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names
in the spirit of 3.0 are available via a #define only. See the email thread.
diff --git a/Objects/frameobject.c b/Objects/frameobject.c
index 36c1fc2..025431e 100644
--- a/Objects/frameobject.c
+++ b/Objects/frameobject.c
@@ -114,7 +114,7 @@
/* Find the bytecode offset for the start of the given line, or the
* first code-owning line after it. */
- PyBytes_AsStringAndSize(f->f_code->co_lnotab, &lnotab, &lnotab_len);
+ PyString_AsStringAndSize(f->f_code->co_lnotab, &lnotab, &lnotab_len);
addr = 0;
line = f->f_code->co_firstlineno;
new_lasti = -1;
@@ -137,7 +137,7 @@
}
/* We're now ready to look at the bytecode. */
- PyBytes_AsStringAndSize(f->f_code->co_code, (char **)&code, &code_len);
+ PyString_AsStringAndSize(f->f_code->co_code, (char **)&code, &code_len);
min_addr = MIN(new_lasti, f->f_lasti);
max_addr = MAX(new_lasti, f->f_lasti);
@@ -548,7 +548,7 @@
int _PyFrame_Init()
{
- builtin_object = PyBytes_InternFromString("__builtins__");
+ builtin_object = PyString_InternFromString("__builtins__");
return (builtin_object != NULL);
}
@@ -728,7 +728,7 @@
for (j = nmap; --j >= 0; ) {
PyObject *key = PyTuple_GET_ITEM(map, j);
PyObject *value = values[j];
- assert(PyBytes_Check(key));
+ assert(PyString_Check(key));
if (deref) {
assert(PyCell_Check(value));
value = PyCell_GET(value);
@@ -776,7 +776,7 @@
for (j = nmap; --j >= 0; ) {
PyObject *key = PyTuple_GET_ITEM(map, j);
PyObject *value = PyObject_GetItem(dict, key);
- assert(PyBytes_Check(key));
+ assert(PyString_Check(key));
/* We only care about NULLs if clear is true. */
if (value == NULL) {
PyErr_Clear();