Skip to content

Commit 8e5bfdf

Browse files
committed
Don't use private _PyUnicode_Equal()
1 parent 7aefdb2 commit 8e5bfdf

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎pythoncapi_compat.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,7 +1590,7 @@ static inline int PyLong_IsZero(PyObject *obj)
15901590
// gh-124502 added PyUnicode_Equal() to Python 3.14.0a0
15911591
#if PY_VERSION_HEX < 0x030E00A0
15921592

1593-
#if PY_VERSION_HEX >= 0x030d0000 && !defined(PYPY_VERSION)
1593+
#if PY_VERSION_HEX >= 0x030d0000 && !defined(PYPY_VERSION) && !defined(Py_LIMITED_API)
15941594
PyAPI_FUNC(int) _PyUnicode_Equal(PyObject *str1, PyObject *str2);
15951595
#endif
15961596

@@ -1605,11 +1605,11 @@ static inline int PyUnicode_Equal(PyObject *str1, PyObject *str2)
16051605
return -1;
16061606
}
16071607

1608-
#if PY_VERSION_HEX >= 0x030d0000 && !defined(PYPY_VERSION)
1608+
#if PY_VERSION_HEX >= 0x030d0000 && !defined(PYPY_VERSION) && !defined(Py_LIMITED_API)
16091609
return _PyUnicode_Equal(str1, str2);
16101610
#elif !defined(PYPY_VERSION) && !defined(Py_LIMITED_API)
16111611
return _PyUnicode_EQ(str1, str2);
1612-
#elif PY_VERSION_HEX >= 0x03090000 && defined(PYPY_VERSION)
1612+
#elif PY_VERSION_HEX >= 0x03090000 && defined(PYPY_VERSION) && !defined(Py_LIMITED_API)
16131613
return _PyUnicode_EQ(str1, str2);
16141614
#else
16151615
return (PyUnicode_Compare(str1, str2) == 0);

0 commit comments

Comments
 (0)