summaryrefslogtreecommitdiffstats
path: root/Parser/asdl_c.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-05-26 12:51:38 (GMT)
committerChristian Heimes <christian@cheimes.de>2008-05-26 12:51:38 (GMT)
commit593daf545bd9b7e7bcb27b498ecc6f36db9ae395 (patch)
treec0a57029b9ab0eb18a2bb4f8fd65f0817f1a1707 /Parser/asdl_c.py
parentc3cb683d638e9d660c18a05293a576f98965166e (diff)
downloadcpython-593daf545bd9b7e7bcb27b498ecc6f36db9ae395.zip
cpython-593daf545bd9b7e7bcb27b498ecc6f36db9ae395.tar.gz
cpython-593daf545bd9b7e7bcb27b498ecc6f36db9ae395.tar.bz2
Renamed PyString to PyBytes
Diffstat (limited to 'Parser/asdl_c.py')
-rwxr-xr-xParser/asdl_c.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py
index 25ff424..0d6c5c0 100755
--- a/Parser/asdl_c.py
+++ b/Parser/asdl_c.py
@@ -375,7 +375,7 @@ class Obj2ModVisitor(PickleVisitor):
# there's really nothing more we can do if this fails ...
self.emit("if (tmp == NULL) goto failed;", 1)
error = "expected some sort of %s, but got %%.400s" % name
- format = "PyErr_Format(PyExc_TypeError, \"%s\", PyString_AS_STRING(tmp));"
+ format = "PyErr_Format(PyExc_TypeError, \"%s\", PyBytes_AS_STRING(tmp));"
self.emit(format % error, 1, reflow=False)
self.emit("failed:", 0)
self.emit("Py_XDECREF(tmp);", 1)
@@ -704,7 +704,7 @@ static PyTypeObject* make_type(char *type, PyTypeObject* base, char**fields, int
fnames = PyTuple_New(num_fields);
if (!fnames) return NULL;
for (i = 0; i < num_fields; i++) {
- PyObject *field = PyString_FromString(fields[i]);
+ PyObject *field = PyBytes_FromString(fields[i]);
if (!field) {
Py_DECREF(fnames);
return NULL;
@@ -723,7 +723,7 @@ static int add_attributes(PyTypeObject* type, char**attrs, int num_fields)
PyObject *s, *l = PyTuple_New(num_fields);
if (!l) return 0;
for(i = 0; i < num_fields; i++) {
- s = PyString_FromString(attrs[i]);
+ s = PyBytes_FromString(attrs[i]);
if (!s) {
Py_DECREF(l);
return 0;
@@ -797,7 +797,7 @@ static int obj2ast_int(PyObject* obj, int* out, PyArena* arena)
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;
}
@@ -815,7 +815,7 @@ static int obj2ast_bool(PyObject* obj, bool* out, PyArena* arena)
PyObject *s = PyObject_Repr(obj);
if (s == NULL) return 1;
PyErr_Format(PyExc_ValueError, "invalid boolean value: %.400s",
- PyString_AS_STRING(s));
+ PyBytes_AS_STRING(s));
Py_DECREF(s);
return 1;
}