[svn:parrot] r44923 - branches/pcc_hackathon_6Mar10/src/call

bacek at svn.parrot.org bacek at svn.parrot.org
Sun Mar 14 11:02:39 UTC 2010


Author: bacek
Date: Sun Mar 14 11:02:37 2010
New Revision: 44923
URL: https://trac.parrot.org/parrot/changeset/44923

Log:
Fix handlig "Pi..." signatures: actually append invokant if it's first argument.

Modified:
   branches/pcc_hackathon_6Mar10/src/call/args.c

Modified: branches/pcc_hackathon_6Mar10/src/call/args.c
==============================================================================
--- branches/pcc_hackathon_6Mar10/src/call/args.c	Sun Mar 14 10:39:04 2010	(r44922)
+++ branches/pcc_hackathon_6Mar10/src/call/args.c	Sun Mar 14 11:02:37 2010	(r44923)
@@ -822,9 +822,14 @@
                     i++; /* skip 'f' */
                 }
                 else if (type_lookahead == 'i') {
-                    Parrot_ex_throw_from_c_args(interp, NULL,
-                        EXCEPTION_INVALID_OPERATION,
-                        "Dispatch: only the first argument can be an invocant");
+                    if (i)
+                        Parrot_ex_throw_from_c_args(interp, NULL,
+                            EXCEPTION_INVALID_OPERATION,
+                            "Dispatch: only the first argument can be an invocant");
+                    else {
+                        VTABLE_push_pmc(interp, call_object, pmc_arg);
+                        i++; /* skip 'i' */
+                    }
                 }
                 else
                     VTABLE_push_pmc(interp, call_object, clone_key_arg(interp, pmc_arg));


More information about the parrot-commits mailing list