Skip to content

Commit

Permalink
webassembly/proxy_c: Support more than 4 args when JS calls Py func.
Browse files Browse the repository at this point in the history
Signed-off-by: Damien George <damien@micropython.org>
  • Loading branch information
dpgeorge committed May 13, 2024
1 parent cc3550e commit c37eb93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ports/webassembly/proxy_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ void proxy_convert_mp_to_js_exc_cside(void *exc, uint32_t *out) {
void proxy_c_to_js_call(uint32_t c_ref, uint32_t n_args, uint32_t *args_value, uint32_t *out) {
nlr_buf_t nlr;
if (nlr_push(&nlr) == 0) {
mp_obj_t args[4] = { mp_const_none, mp_const_none, mp_const_none, mp_const_none };
mp_obj_t args[n_args];
for (size_t i = 0; i < n_args; ++i) {
args[i] = proxy_convert_js_to_mp_obj_cside(args_value + i * 3);
}
Expand Down

0 comments on commit c37eb93

Please sign in to comment.