Renamed PyString to PyBytes

This commit is contained in:
Christian Heimes 2008-05-26 13:28:38 +00:00
parent 9c4756ea26
commit 72b710a596
78 changed files with 983 additions and 983 deletions

View file

@ -91,7 +91,7 @@ termios_tcgetattr(PyObject *self, PyObject *args)
return NULL;
for (i = 0; i < NCCS; i++) {
ch = (char)mode.c_cc[i];
v = PyString_FromStringAndSize(&ch, 1);
v = PyBytes_FromStringAndSize(&ch, 1);
if (v == NULL)
goto err;
PyList_SetItem(cc, i, v);
@ -183,8 +183,8 @@ termios_tcsetattr(PyObject *self, PyObject *args)
for (i = 0; i < NCCS; i++) {
v = PyList_GetItem(cc, i);
if (PyString_Check(v) && PyString_Size(v) == 1)
mode.c_cc[i] = (cc_t) * PyString_AsString(v);
if (PyBytes_Check(v) && PyBytes_Size(v) == 1)
mode.c_cc[i] = (cc_t) * PyBytes_AsString(v);
else if (PyLong_Check(v))
mode.c_cc[i] = (cc_t) PyLong_AsLong(v);
else {