summaryrefslogtreecommitdiffstats
path: root/Modules/_testcapimodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_testcapimodule.c')
-rw-r--r--Modules/_testcapimodule.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index f1eac91..ab9467e 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -1803,13 +1803,12 @@ test_string_from_format(PyObject *self, PyObject *args)
{
PyObject *result;
char *msg;
- static const Py_UNICODE one[] = {'1', 0};
#define CHECK_1_FORMAT(FORMAT, TYPE) \
result = PyUnicode_FromFormat(FORMAT, (TYPE)1); \
if (result == NULL) \
return NULL; \
- if (Py_UNICODE_strcmp(PyUnicode_AS_UNICODE(result), one)) { \
+ if (PyUnicode_CompareWithASCIIString(result, "1")) { \
msg = FORMAT " failed at 1"; \
goto Fail; \
} \