diff Python/Python-ast.c @ 42816:872c7c3f0af3

Use unicode for AST attributes
author Neal Norwitz <nnorwitz@gmail.com>
date Sat, 25 Aug 2007 01:33:49 +0000
parents d1c7c2543903
children 5355337709e1
line wrap: on
line diff
--- a/Python/Python-ast.c	Sat Aug 25 01:04:34 2007 +0000
+++ b/Python/Python-ast.c	Sat Aug 25 01:33:49 2007 +0000
@@ -404,7 +404,7 @@
         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;
@@ -423,7 +423,7 @@
     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;