mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
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().
This commit is contained in:
parent
d81d57e959
commit
db388df1d9
3 changed files with 21 additions and 10 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue