diff options
author | Guido van Rossum <guido@python.org> | 2007-07-16 23:36:05 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-07-16 23:36:05 (GMT) |
commit | 1c5a98a360093a99136f2a87251aa7c53b87170b (patch) | |
tree | 5ed5cf22bec00126d3337b61f23a3bf35366ec8f /Modules | |
parent | d77d6992a5e31660a9eb8dc02f6c28d464c75ed8 (diff) | |
download | cpython-1c5a98a360093a99136f2a87251aa7c53b87170b.zip cpython-1c5a98a360093a99136f2a87251aa7c53b87170b.tar.gz cpython-1c5a98a360093a99136f2a87251aa7c53b87170b.tar.bz2 |
Fix for cProfile.
SF patch# 1755176 by Amaury Forgeot d'Arc.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_lsprof.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/_lsprof.c b/Modules/_lsprof.c index d665f83..6de65b7 100644 --- a/Modules/_lsprof.c +++ b/Modules/_lsprof.c @@ -182,6 +182,9 @@ normalizeUserObj(PyObject *obj) if (mod && PyString_Check(mod)) { modname = PyString_AS_STRING(mod); } + else if (mod && PyUnicode_Check(mod)) { + modname = PyUnicode_AsString(mod); + } else if (mod && PyModule_Check(mod)) { modname = PyModule_GetName(mod); if (modname == NULL) { |