Skip to content

Commit

Permalink
fix obsolete private API aliases for 3.13 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
nitzmahone committed Oct 17, 2023
1 parent 41fa912 commit dc03908
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/c/_cffi_backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@
# define PyText_Check PyUnicode_Check
# define PyTextAny_Check PyUnicode_Check
# define PyText_FromFormat PyUnicode_FromFormat
# define PyText_AsUTF8 _PyUnicode_AsString /* PyUnicode_AsUTF8 in Py3.3 */
# define PyText_AS_UTF8 _PyUnicode_AsString
# define PyText_AsUTF8 PyUnicode_AsUTF8
# define PyText_AS_UTF8 PyUnicode_AsUTF8
# if PY_VERSION_HEX >= 0x03030000
# define PyText_GetSize PyUnicode_GetLength
# else
Expand Down
4 changes: 3 additions & 1 deletion src/c/misc_thread_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,9 @@ PyAPI_DATA(void *volatile) _PyThreadState_Current;

static PyThreadState *get_current_ts(void)
{
#if PY_VERSION_HEX >= 0x03060000
#if PY_VERSION_HEX >= 0x030D0000
return PyThreadState_GetUnchecked();
#elif PY_VERSION_HEX >= 0x03060000
return _PyThreadState_UncheckedGet();
#elif defined(_Py_atomic_load_relaxed)
return (PyThreadState*)_Py_atomic_load_relaxed(&_PyThreadState_Current);
Expand Down

0 comments on commit dc03908

Please sign in to comment.