From 392c5bed123a8cea62b621a84266214ca959fb31 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Sat, 25 Aug 2007 17:20:32 +0000 Subject: Use unicode --- Modules/pyexpat.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c index 02c5d40..6cfb8ec 100644 --- a/Modules/pyexpat.c +++ b/Modules/pyexpat.c @@ -146,7 +146,7 @@ get_handler_name(struct HandlerInfo *hinfo) { PyObject *name = hinfo->nameobj; if (name == NULL) { - name = PyString_FromString(hinfo->name); + name = PyUnicode_FromString(hinfo->name); hinfo->nameobj = name; } Py_XINCREF(name); @@ -1408,7 +1408,7 @@ xmlparse_dir(PyObject *self, PyObject* noargs) { #define APPEND(list, str) \ do { \ - PyObject *o = PyString_FromString(str); \ + PyObject *o = PyUnicode_FromString(str); \ if (o != NULL) \ PyList_Append(list, o); \ Py_XDECREF(o); \ @@ -1706,7 +1706,7 @@ get_version_string(void) while (rev[i] != ' ' && rev[i] != '\0') ++i; - return PyString_FromStringAndSize(rev, i); + return PyUnicode_FromStringAndSize(rev, i); } /* Initialization function for the module */ @@ -1733,7 +1733,7 @@ PyMODINIT_FUNC MODULE_INITFUNC(void) { PyObject *m, *d; - PyObject *errmod_name = PyString_FromString(MODULE_NAME ".errors"); + PyObject *errmod_name = PyUnicode_FromString(MODULE_NAME ".errors"); PyObject *errors_module; PyObject *modelmod_name; PyObject *model_module; @@ -1743,7 +1743,7 @@ MODULE_INITFUNC(void) if (errmod_name == NULL) return; - modelmod_name = PyString_FromString(MODULE_NAME ".model"); + modelmod_name = PyUnicode_FromString(MODULE_NAME ".model"); if (modelmod_name == NULL) return; -- cgit v0.12