Renamed PyString to PyBytes

This commit is contained in:
Christian Heimes 2008-05-26 12:51:38 +00:00
parent c3cb683d63
commit 593daf545b
176 changed files with 2793 additions and 2791 deletions

View file

@ -114,7 +114,7 @@ frame_setlineno(PyFrameObject *f, PyObject* p_new_lineno)
/* Find the bytecode offset for the start of the given line, or the
* first code-owning line after it. */
PyString_AsStringAndSize(f->f_code->co_lnotab, &lnotab, &lnotab_len);
PyBytes_AsStringAndSize(f->f_code->co_lnotab, &lnotab, &lnotab_len);
addr = 0;
line = f->f_code->co_firstlineno;
new_lasti = -1;
@ -137,7 +137,7 @@ frame_setlineno(PyFrameObject *f, PyObject* p_new_lineno)
}
/* We're now ready to look at the bytecode. */
PyString_AsStringAndSize(f->f_code->co_code, (char **)&code, &code_len);
PyBytes_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 @@ static PyObject *builtin_object;
int _PyFrame_Init()
{
builtin_object = PyString_InternFromString("__builtins__");
builtin_object = PyBytes_InternFromString("__builtins__");
return (builtin_object != NULL);
}
@ -728,7 +728,7 @@ map_to_dict(PyObject *map, Py_ssize_t nmap, PyObject *dict, PyObject **values,
for (j = nmap; --j >= 0; ) {
PyObject *key = PyTuple_GET_ITEM(map, j);
PyObject *value = values[j];
assert(PyString_Check(key));
assert(PyBytes_Check(key));
if (deref) {
assert(PyCell_Check(value));
value = PyCell_GET(value);
@ -776,7 +776,7 @@ dict_to_map(PyObject *map, Py_ssize_t nmap, PyObject *dict, PyObject **values,
for (j = nmap; --j >= 0; ) {
PyObject *key = PyTuple_GET_ITEM(map, j);
PyObject *value = PyObject_GetItem(dict, key);
assert(PyString_Check(key));
assert(PyBytes_Check(key));
/* We only care about NULLs if clear is true. */
if (value == NULL) {
PyErr_Clear();