summaryrefslogtreecommitdiff
path: root/Modules/_lsprof.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-11-16 10:17:58 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2016-11-16 10:17:58 +0200
commitf4934ea77da38516731a75fbf9458b248d26dd81 (patch)
tree9fe19276fac7661f433f86673ff7862663ed7693 /Modules/_lsprof.c
parent5ebff7b300448db36d0d0eda7d265caa06fce6d2 (diff)
downloadcpython-git-f4934ea77da38516731a75fbf9458b248d26dd81.tar.gz
Issue #28701: Replace PyUnicode_CompareWithASCIIString with _PyUnicode_EqualToASCIIString.
The latter function is more readable, faster and doesn't raise exceptions.
Diffstat (limited to 'Modules/_lsprof.c')
-rw-r--r--Modules/_lsprof.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_lsprof.c b/Modules/_lsprof.c
index 66e534f2a8..7876e714b7 100644
--- a/Modules/_lsprof.c
+++ b/Modules/_lsprof.c
@@ -185,7 +185,7 @@ normalizeUserObj(PyObject *obj)
}
}
if (modname != NULL) {
- if (PyUnicode_CompareWithASCIIString(modname, "builtins") != 0) {
+ if (!_PyUnicode_EqualToASCIIString(modname, "builtins")) {
PyObject *result;
result = PyUnicode_FromFormat("<%U.%s>", modname,
fn->m_ml->ml_name);