Fix args order in trampoline #14

Open
wants to merge 3 commits into
from
Jump to file or symbol
Failed to load files and symbols.
+3 −3
Diff settings

Always

Just for now

View
@@ -71,7 +71,7 @@ blizkost_marshal_arg(BLIZKOST_NEXUS, PMC *arg) {
char *c_str = Parrot_str_to_cstring(interp, VTABLE_get_string(interp, arg));
result = sv_2mortal(newSVpv(c_str, strlen(c_str)));
}
- else if (VTABLE_isa(interp, arg, CONST_STRING(interp, "Sub"))) {
+ else if (VTABLE_does(interp, arg, CONST_STRING(interp, "invokable"))) {
CV *wrapper = blizkost_wrap_callable(nexus, arg);
result = sv_2mortal(newRV_inc((SV*)wrapper));
}
@@ -316,11 +316,11 @@ XS(blizkost_callable_trampoline)
SP -= items;
PUTBACK;
- args = Parrot_pmc_new(nexus->parrot_interp, enum_class_ResizablePMCArray);
+ args = Parrot_pmc_new_init_int(nexus->parrot_interp, enum_class_ResizablePMCArray, items);
for (i = 0; i < items; i++) {
SV *svarg = ST(i);
PMC *pmcarg = blizkost_wrap_sv(nexus, svarg);
- VTABLE_unshift_pmc(nexus->parrot_interp, args, pmcarg);
+ VTABLE_set_pmc_keyed_int(nexus->parrot_interp, args, i, pmcarg);
}
Parrot_pcc_invoke_sub_from_c_args(nexus->parrot_interp, callable,