Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Fix args order in trampoline #14

wants to merge 3 commits into from

1 participant


In my tests it looks like the args are passed in inverted order to callbacks, This change fixes it, and avoid reallocating the array of args while buildig it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 8, 2010
  1. @leto

    fix order of args in trampoline

    Julian authored leto committed
Commits on Sep 10, 2010
  1. @NotFound

    Use does invokable instead of isa Sub to identify invokables in marsh…

    NotFound authored committed
Commits on Sep 11, 2010
  1. @NotFound
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/pmc/bkmarshal.c
6 src/pmc/bkmarshal.c
@@ -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;
- 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,
Something went wrong with that request. Please try again.