From f4934ea77da38516731a75fbf9458b248d26dd81 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Wed, 16 Nov 2016 10:17:58 +0200 Subject: Issue #28701: Replace PyUnicode_CompareWithASCIIString with _PyUnicode_EqualToASCIIString. The latter function is more readable, faster and doesn't raise exceptions. --- Objects/moduleobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Objects/moduleobject.c') diff --git a/Objects/moduleobject.c b/Objects/moduleobject.c index ac07642cfb..ae72da6e3b 100644 --- a/Objects/moduleobject.c +++ b/Objects/moduleobject.c @@ -587,7 +587,7 @@ _PyModule_ClearDict(PyObject *d) while (PyDict_Next(d, &pos, &key, &value)) { if (value != Py_None && PyUnicode_Check(key)) { if (PyUnicode_READ_CHAR(key, 0) != '_' || - PyUnicode_CompareWithASCIIString(key, "__builtins__") != 0) + !_PyUnicode_EqualToASCIIString(key, "__builtins__")) { if (Py_VerboseFlag > 1) { const char *s = _PyUnicode_AsString(key); -- cgit v1.2.1