diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2007-08-26 02:22:30 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2007-08-26 02:22:30 (GMT) |
commit | e1188629a6892f59659546bacfb6fd0d8e0c4bcb (patch) | |
tree | 6a15d5a41647b1475c4e0baa93318a8c526cfa81 /Modules | |
parent | 312e10d63eaface69dbe3e4271545cb9c4429bed (diff) | |
download | cpython-e1188629a6892f59659546bacfb6fd0d8e0c4bcb.zip cpython-e1188629a6892f59659546bacfb6fd0d8e0c4bcb.tar.gz cpython-e1188629a6892f59659546bacfb6fd0d8e0c4bcb.tar.bz2 |
Use unicode
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_lsprof.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Modules/_lsprof.c b/Modules/_lsprof.c index eca7c6d..0da818b 100644 --- a/Modules/_lsprof.c +++ b/Modules/_lsprof.c @@ -196,19 +196,19 @@ normalizeUserObj(PyObject *obj) modname = "__builtin__"; } if (strcmp(modname, "__builtin__") != 0) - return PyString_FromFormat("<%s.%s>", - modname, - fn->m_ml->ml_name); + return PyUnicode_FromFormat("<%s.%s>", + modname, + fn->m_ml->ml_name); else - return PyString_FromFormat("<%s>", - fn->m_ml->ml_name); + return PyUnicode_FromFormat("<%s>", + fn->m_ml->ml_name); } else { /* built-in method: try to return repr(getattr(type(__self__), __name__)) */ PyObject *self = fn->m_self; - PyObject *name = PyString_FromString(fn->m_ml->ml_name); + PyObject *name = PyUnicode_FromString(fn->m_ml->ml_name); if (name != NULL) { PyObject *mo = _PyType_Lookup(Py_Type(self), name); Py_XINCREF(mo); @@ -221,8 +221,8 @@ normalizeUserObj(PyObject *obj) } } PyErr_Clear(); - return PyString_FromFormat("<built-in method %s>", - fn->m_ml->ml_name); + return PyUnicode_FromFormat("<built-in method %s>", + fn->m_ml->ml_name); } } |