summaryrefslogtreecommitdiff
path: root/Modules/_lsprof.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-11-16 10:19:20 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2016-11-16 10:19:20 +0200
commit3b73ea127892d0e1f9d8f12f88e4f9c0ba0b89b1 (patch)
treea1a58a83f9d60f7d5d02e5d116bb76ee13c42254 /Modules/_lsprof.c
parent21060105d99a9153db44dd88eb750965392fd966 (diff)
parentf4934ea77da38516731a75fbf9458b248d26dd81 (diff)
downloadcpython-git-3b73ea127892d0e1f9d8f12f88e4f9c0ba0b89b1.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 dc3f8ab2fa..0e7623ddbc 100644
--- a/Modules/_lsprof.c
+++ b/Modules/_lsprof.c
@@ -181,7 +181,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);