Skip to content

Commit 3feb5b7

Browse files
committed
fix: Python 3.13 moved the undocumented _PyArg_UnpackKeywords function to private API
1 parent dc4442d commit 3feb5b7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/JSArrayProxy.cc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,6 +1168,15 @@ static bool sort_compare_default(JSContext *cx, unsigned argc, JS::Value *vp) {
11681168
return true;
11691169
}
11701170

1171+
// Python 3.13 moved this function to private API. Re-exporting it.
1172+
extern PyObject *const *_PyArg_UnpackKeywords(
1173+
PyObject *const *args, Py_ssize_t nargs,
1174+
PyObject *kwargs, PyObject *kwnames,
1175+
struct _PyArg_Parser *parser,
1176+
int minpos, int maxpos, int minkw,
1177+
PyObject **buf
1178+
);
1179+
11711180
PyObject *JSArrayProxyMethodDefinitions::JSArrayProxy_sort(JSArrayProxy *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) {
11721181
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
11731182

0 commit comments

Comments
 (0)