Renamed PyString to PyBytes
diff --git a/Python/Python-ast.c b/Python/Python-ast.c
index 9e9ba06..12bff58 100644
--- a/Python/Python-ast.c
+++ b/Python/Python-ast.c
@@ -609,7 +609,7 @@
PyObject *s = PyObject_Repr(obj);
if (s == NULL) return 1;
PyErr_Format(PyExc_ValueError, "invalid integer value: %.400s",
- PyString_AS_STRING(s));
+ PyBytes_AS_STRING(s));
Py_DECREF(s);
return 1;
}
@@ -3485,7 +3485,7 @@
tmp = PyObject_Repr(obj);
if (tmp == NULL) goto failed;
- PyErr_Format(PyExc_TypeError, "expected some sort of mod, but got %.400s", PyString_AS_STRING(tmp));
+ PyErr_Format(PyExc_TypeError, "expected some sort of mod, but got %.400s", PyBytes_AS_STRING(tmp));
failed:
Py_XDECREF(tmp);
return 1;
@@ -4595,7 +4595,7 @@
tmp = PyObject_Repr(obj);
if (tmp == NULL) goto failed;
- PyErr_Format(PyExc_TypeError, "expected some sort of stmt, but got %.400s", PyString_AS_STRING(tmp));
+ PyErr_Format(PyExc_TypeError, "expected some sort of stmt, but got %.400s", PyBytes_AS_STRING(tmp));
failed:
Py_XDECREF(tmp);
return 1;
@@ -5616,7 +5616,7 @@
tmp = PyObject_Repr(obj);
if (tmp == NULL) goto failed;
- PyErr_Format(PyExc_TypeError, "expected some sort of expr, but got %.400s", PyString_AS_STRING(tmp));
+ PyErr_Format(PyExc_TypeError, "expected some sort of expr, but got %.400s", PyBytes_AS_STRING(tmp));
failed:
Py_XDECREF(tmp);
return 1;
@@ -5654,7 +5654,7 @@
tmp = PyObject_Repr(obj);
if (tmp == NULL) goto failed;
- PyErr_Format(PyExc_TypeError, "expected some sort of expr_context, but got %.400s", PyString_AS_STRING(tmp));
+ PyErr_Format(PyExc_TypeError, "expected some sort of expr_context, but got %.400s", PyBytes_AS_STRING(tmp));
failed:
Py_XDECREF(tmp);
return 1;
@@ -5766,7 +5766,7 @@
tmp = PyObject_Repr(obj);
if (tmp == NULL) goto failed;
- PyErr_Format(PyExc_TypeError, "expected some sort of slice, but got %.400s", PyString_AS_STRING(tmp));
+ PyErr_Format(PyExc_TypeError, "expected some sort of slice, but got %.400s", PyBytes_AS_STRING(tmp));
failed:
Py_XDECREF(tmp);
return 1;
@@ -5788,7 +5788,7 @@
tmp = PyObject_Repr(obj);
if (tmp == NULL) goto failed;
- PyErr_Format(PyExc_TypeError, "expected some sort of boolop, but got %.400s", PyString_AS_STRING(tmp));
+ PyErr_Format(PyExc_TypeError, "expected some sort of boolop, but got %.400s", PyBytes_AS_STRING(tmp));
failed:
Py_XDECREF(tmp);
return 1;
@@ -5850,7 +5850,7 @@
tmp = PyObject_Repr(obj);
if (tmp == NULL) goto failed;
- PyErr_Format(PyExc_TypeError, "expected some sort of operator, but got %.400s", PyString_AS_STRING(tmp));
+ PyErr_Format(PyExc_TypeError, "expected some sort of operator, but got %.400s", PyBytes_AS_STRING(tmp));
failed:
Py_XDECREF(tmp);
return 1;
@@ -5880,7 +5880,7 @@
tmp = PyObject_Repr(obj);
if (tmp == NULL) goto failed;
- PyErr_Format(PyExc_TypeError, "expected some sort of unaryop, but got %.400s", PyString_AS_STRING(tmp));
+ PyErr_Format(PyExc_TypeError, "expected some sort of unaryop, but got %.400s", PyBytes_AS_STRING(tmp));
failed:
Py_XDECREF(tmp);
return 1;
@@ -5934,7 +5934,7 @@
tmp = PyObject_Repr(obj);
if (tmp == NULL) goto failed;
- PyErr_Format(PyExc_TypeError, "expected some sort of cmpop, but got %.400s", PyString_AS_STRING(tmp));
+ PyErr_Format(PyExc_TypeError, "expected some sort of cmpop, but got %.400s", PyBytes_AS_STRING(tmp));
failed:
Py_XDECREF(tmp);
return 1;
@@ -6100,7 +6100,7 @@
tmp = PyObject_Repr(obj);
if (tmp == NULL) goto failed;
- PyErr_Format(PyExc_TypeError, "expected some sort of excepthandler, but got %.400s", PyString_AS_STRING(tmp));
+ PyErr_Format(PyExc_TypeError, "expected some sort of excepthandler, but got %.400s", PyBytes_AS_STRING(tmp));
failed:
Py_XDECREF(tmp);
return 1;