Skip to content

Commit

Permalink
[mypyc] Don't use _PyUnicode_EQ on 3.13, as it's no longer exported (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
JukkaL committed Jul 14, 2024
1 parent 3c9f694 commit 45bb91e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions mypyc/lib-rt/getargsfast.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,16 @@ find_keyword(PyObject *kwnames, PyObject *const *kwstack, PyObject *key)
for (i = 0; i < nkwargs; i++) {
PyObject *kwname = PyTuple_GET_ITEM(kwnames, i);
assert(PyUnicode_Check(kwname));
#if CPY_3_13_FEATURES
if (_PyUnicode_Equal(kwname, key)) {
return kwstack[i];
}
#else
if (_PyUnicode_EQ(kwname, key)) {
return kwstack[i];
}
#endif

}
return NULL;
}
Expand Down

0 comments on commit 45bb91e

Please sign in to comment.