[svn:parrot] r41938 - branches/pcc_reapply/src/call
bacek at svn.parrot.org
bacek at svn.parrot.org
Mon Oct 19 09:22:56 UTC 2009
Author: bacek
Date: Mon Oct 19 09:22:55 2009
New Revision: 41938
URL: https://trac.parrot.org/parrot/changeset/41938
Log:
Don't append "Pi" in front of signature if it's already present.
Modified:
branches/pcc_reapply/src/call/args.c
Modified: branches/pcc_reapply/src/call/args.c
==============================================================================
--- branches/pcc_reapply/src/call/args.c Mon Oct 19 08:28:22 2009 (r41937)
+++ branches/pcc_reapply/src/call/args.c Mon Oct 19 09:22:55 2009 (r41938)
@@ -836,6 +836,7 @@
const INTVAL sig_len = strlen(sig);
INTVAL in_return_sig = 0;
INTVAL i;
+ int append_pi = 1;
if (!sig_len)
return call_object;
@@ -918,6 +919,7 @@
EXCEPTION_INVALID_OPERATION,
"Dispatch: only the first argument can be an invocant");
i++; /* skip 'i' */
+ append_pi = 0; /* Don't append Pi in front of signature */
}
}
break;
@@ -934,8 +936,8 @@
}
}
- /* Check if we have an invocant, and add it to the front of the arguments */
- if (!PMC_IS_NULL(obj)) {
+ /* Check if we have an invocant, and add it to the front of the arguments iff needed */
+ if (!PMC_IS_NULL(obj) && append_pi) {
string_sig = Parrot_str_concat(interp, CONST_STRING(interp, "Pi"), string_sig, 0);
VTABLE_set_string_native(interp, call_object, string_sig);
VTABLE_unshift_pmc(interp, call_object, obj);
More information about the parrot-commits
mailing list