summaryrefslogtreecommitdiffstats
path: root/Objects/stringlib/eq.h
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2022-05-13 09:49:56 (GMT)
committerGitHub <noreply@github.com>2022-05-13 09:49:56 (GMT)
commitdb388df1d9aff02f791fe01c7c2b28d73982dce6 (patch)
tree2036b25a568296310b1dc64cdb52d3e42a084176 /Objects/stringlib/eq.h
parentd81d57e9598dea741e049f3876ccd87072a38906 (diff)
downloadcpython-db388df1d9aff02f791fe01c7c2b28d73982dce6.zip
cpython-db388df1d9aff02f791fe01c7c2b28d73982dce6.tar.gz
cpython-db388df1d9aff02f791fe01c7c2b28d73982dce6.tar.bz2
gh-89653: PEP 670: Convert PyUnicode_KIND() macro to function (#92705)
In the limited C API version 3.12, PyUnicode_KIND() is now implemented as a static inline function. Keep the macro for the regular C API and for the limited C API version 3.11 and older to prevent introducing new compiler warnings. Update _decimal.c and stringlib/eq.h for PyUnicode_KIND().
Diffstat (limited to 'Objects/stringlib/eq.h')
-rw-r--r--Objects/stringlib/eq.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/Objects/stringlib/eq.h b/Objects/stringlib/eq.h
index 2f24388..2eac4ba 100644
--- a/Objects/stringlib/eq.h
+++ b/Objects/stringlib/eq.h
@@ -6,9 +6,6 @@
Py_LOCAL_INLINE(int)
unicode_eq(PyObject *a, PyObject *b)
{
- assert(PyUnicode_Check(a));
- assert(PyUnicode_Check(b));
-
if (PyUnicode_GET_LENGTH(a) != PyUnicode_GET_LENGTH(b))
return 0;
if (PyUnicode_GET_LENGTH(a) == 0)