From f5894dd646f5e39918377b37b8c8694cebdca103 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Wed, 16 Nov 2016 15:40:39 +0200 Subject: Issue #28701: Replace _PyUnicode_CompareWithId with _PyUnicode_EqualToASCIIId. The latter function is more readable, faster and doesn't raise exceptions. Based on patch by Xiang Zhang. --- Python/errors.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/errors.c') diff --git a/Python/errors.c b/Python/errors.c index 6cc0c20cd5..dd01448518 100644 --- a/Python/errors.c +++ b/Python/errors.c @@ -934,7 +934,7 @@ PyErr_WriteUnraisable(PyObject *obj) goto done; } else { - if (_PyUnicode_CompareWithId(moduleName, &PyId_builtins) != 0) { + if (!_PyUnicode_EqualToASCIIId(moduleName, &PyId_builtins)) { if (PyFile_WriteObject(moduleName, f, Py_PRINT_RAW) < 0) goto done; if (PyFile_WriteString(".", f) < 0) -- cgit v1.2.1