summaryrefslogtreecommitdiffstats
path: root/Parser/asdl_c.py
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2007-08-25 01:33:49 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2007-08-25 01:33:49 (GMT)
commite4dc32488446240942123cf4e9e7296ad97e20bf (patch)
treef9c0d0ad9943a6aab61228ab58d19122b4b80590 /Parser/asdl_c.py
parentaefab1e2ac717fce622213cace75adf4112aa84e (diff)
downloadcpython-e4dc32488446240942123cf4e9e7296ad97e20bf.zip
cpython-e4dc32488446240942123cf4e9e7296ad97e20bf.tar.gz
cpython-e4dc32488446240942123cf4e9e7296ad97e20bf.tar.bz2
Use unicode for AST attributes
Diffstat (limited to 'Parser/asdl_c.py')
-rwxr-xr-xParser/asdl_c.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py
index 8c33e9d..2366b1a 100755
--- a/Parser/asdl_c.py
+++ b/Parser/asdl_c.py
@@ -408,7 +408,7 @@ static PyTypeObject* make_type(char *type, PyTypeObject* base, char**fields, int
Py_INCREF(Py_None);
}
for(i=0; i < num_fields; i++) {
- PyObject *field = PyString_FromString(fields[i]);
+ PyObject *field = PyUnicode_FromString(fields[i]);
if (!field) {
Py_DECREF(fnames);
return NULL;
@@ -427,7 +427,7 @@ static int add_attributes(PyTypeObject* type, char**attrs, int num_fields)
PyObject *s, *l = PyList_New(num_fields);
if (!l) return 0;
for(i = 0; i < num_fields; i++) {
- s = PyString_FromString(attrs[i]);
+ s = PyUnicode_FromString(attrs[i]);
if (!s) {
Py_DECREF(l);
return 0;