[Python-3000-checkins] r57487 - python/branches/py3k/Modules/_lsprof.c
neal.norwitz
python-3000-checkins at python.org
Sun Aug 26 04:22:31 CEST 2007
Author: neal.norwitz
Date: Sun Aug 26 04:22:30 2007
New Revision: 57487
Modified:
python/branches/py3k/Modules/_lsprof.c
Log:
Use unicode
Modified: python/branches/py3k/Modules/_lsprof.c
==============================================================================
--- python/branches/py3k/Modules/_lsprof.c (original)
+++ python/branches/py3k/Modules/_lsprof.c Sun Aug 26 04:22:30 2007
@@ -196,19 +196,19 @@
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 @@
}
}
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);
}
}
More information about the Python-3000-checkins
mailing list