From 3160d7f3e98f5d4c746b0f2984fdd31a3fd6df84 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 3 Aug 2023 22:21:42 +0200 Subject: [PATCH] py_panda: Don't use _PyUnicode_EqualToASCIIString in Python 3.13+ See #1523 --- dtool/src/interrogatedb/py_panda.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dtool/src/interrogatedb/py_panda.cxx b/dtool/src/interrogatedb/py_panda.cxx index 6190b6e642..bfd871b096 100644 --- a/dtool/src/interrogatedb/py_panda.cxx +++ b/dtool/src/interrogatedb/py_panda.cxx @@ -801,7 +801,7 @@ bool Dtool_ExtractArg(PyObject **result, PyObject *args, PyObject *kwds, if (kwds != nullptr && PyDict_GET_SIZE(kwds) == 1 && PyDict_Next(kwds, &ppos, &key, result)) { // We got the item, we just need to make sure that it had the right key. -#if PY_VERSION_HEX >= 0x03060000 +#if PY_VERSION_HEX >= 0x03060000 && PY_VERSION_HEX < 0x030D0000 return PyUnicode_CheckExact(key) && _PyUnicode_EqualToASCIIString(key, keyword); #elif PY_MAJOR_VERSION >= 3 return PyUnicode_CheckExact(key) && PyUnicode_CompareWithASCIIString(key, keyword) == 0;