Skip to content

Commit

Permalink
[mypyc] Don't use _PyUnicode_FastCopyCharacters on 3.13 (#17524)
Browse files Browse the repository at this point in the history
  • Loading branch information
JukkaL authored Jul 14, 2024
1 parent 45bb91e commit 42337a0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mypyc/lib-rt/str_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,11 @@ PyObject *CPyStr_Build(Py_ssize_t len, ...) {
PyObject *item = va_arg(args, PyObject *);
Py_ssize_t itemlen = PyUnicode_GET_LENGTH(item);
if (itemlen != 0) {
#if CPY_3_13_FEATURES
PyUnicode_CopyCharacters(res, res_offset, item, 0, itemlen);
#else
_PyUnicode_FastCopyCharacters(res, res_offset, item, 0, itemlen);
#endif
res_offset += itemlen;
}
}
Expand Down

0 comments on commit 42337a0

Please sign in to comment.