[svn:parrot] r41614 - branches/pcc_reapply/src/call

allison at svn.parrot.org allison at svn.parrot.org
Fri Oct 2 13:32:41 UTC 2009


Author: allison
Date: Fri Oct  2 13:32:40 2009
New Revision: 41614
URL: https://trac.parrot.org/parrot/changeset/41614

Log:
[pcc] Only complain about a missing result signature when return values are
passed.

Modified:
   branches/pcc_reapply/src/call/pcc.c

Modified: branches/pcc_reapply/src/call/pcc.c
==============================================================================
--- branches/pcc_reapply/src/call/pcc.c	Fri Oct  2 13:25:04 2009	(r41613)
+++ branches/pcc_reapply/src/call/pcc.c	Fri Oct  2 13:32:40 2009	(r41614)
@@ -1396,11 +1396,13 @@
 
     return_list = VTABLE_get_attr_str(interp, call_object, CONST_STRING(interp, "returns"));
     if (PMC_IS_NULL(return_list)) {
-        if (err_check)
-            Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
-                    "too many return values: %d passed, 0 expected",
-                    raw_return_count, return_list_elements);
-        return;
+        if (raw_return_count > 0) {
+            if (err_check)
+                Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
+                        "too many return values: %d passed, 0 expected",
+                        raw_return_count);
+            return;
+        }
     }
     else
         return_list_elements = VTABLE_elements(interp, return_list);


More information about the parrot-commits mailing list