python / pythoncapi-compat

The pythoncapi-compat project can be used to write a C extension supporting a wide range of Python versions with a single code base.
https://pythoncapi-compat.readthedocs.io/
BSD Zero Clause License
80 stars 23 forks source link

Add PyUnicode_EqualToUTF8() function #78

Closed vstinner closed 1 year ago

vstinner commented 1 year ago

Wait until the API is added upstream: https://github.com/python/cpython/pull/110297

serhiy-storchaka commented 1 year ago

You need to at least save and restore the exception as in PyDict_GetItem().

vstinner commented 1 year ago

You need to at least save and restore the exception as in PyDict_GetItem().

Right, done. I added a test for that.