@@ -212,16 +212,20 @@ PyObject *context_async_call(context_c *self, PyObject *args, PyObject *kwargs)
212
212
int argc = PyTuple_GET_SIZE (call_args);
213
213
MaybeLocal<Value> result;
214
214
215
+ #ifndef _WIN32
215
216
if (argc <= 16 ) {
216
217
Local<Value> argv[argc];
217
218
jss_from_pys (call_args, argv, context);
218
219
result = object->CallAsFunction (context, js_this, argc, argv);
219
220
} else {
221
+ #endif
220
222
Local<Value> *argv = new Local<Value>[argc];
221
223
jss_from_pys (call_args, argv, context);
222
224
result = object->CallAsFunction (context, js_this, argc, argv);
223
225
delete[] argv;
226
+ #ifndef _WIN32
224
227
}
228
+ #endif
225
229
226
230
PY_PROPAGATE_JS;
227
231
@@ -322,7 +326,7 @@ PyObject *context_bind_py_function(context_c *self, PyObject *args) {
322
326
PyObject *py_function_args = PyTuple_GetSlice (args, 1 , argc);
323
327
324
328
int py_argc = (int )PyTuple_GET_SIZE (py_function_args);
325
- Local<Value> argv[py_argc + 1 ];
329
+ Local<Value> * argv = new Local<Value> [py_argc + 1 ];
326
330
argv[0 ] = Null (isolate);
327
331
jss_from_pys (py_function_args, &argv[1 ], context);
328
332
@@ -331,6 +335,7 @@ PyObject *context_bind_py_function(context_c *self, PyObject *args) {
331
335
332
336
// use a hack to do the javascript "currying" converted_function.bind(null, py_function_args)
333
337
Local<Function> bound_function = bind_function (self, context, py_argc + 1 , argv, converted_function);
338
+ delete[] argv;
334
339
335
340
// release the arguments
336
341
Py_DECREF (py_function_args);
0 commit comments