diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2007-08-25 01:33:49 +0000 |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2007-08-25 01:33:49 +0000 |
commit | 9a40bf8aa4d5333d9857db8e84aad41707923001 (patch) | |
tree | 1e54f0706175ea106cddb2584b84e6b53b7d921c /Python/Python-ast.c | |
parent | 70ffe3bbf4912ec3738f2bf43cb0c0833ffdec76 (diff) | |
download | cpython-9a40bf8aa4d5333d9857db8e84aad41707923001.tar.gz |
Use unicode for AST attributes
Diffstat (limited to 'Python/Python-ast.c')
-rw-r--r-- | Python/Python-ast.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/Python-ast.c b/Python/Python-ast.c index ee1973adf4..605a152ca9 100644 --- a/Python/Python-ast.c +++ b/Python/Python-ast.c @@ -404,7 +404,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; @@ -423,7 +423,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; |