[svn:parrot] r41724 - branches/pcc_reapply/src/call
bacek at svn.parrot.org
bacek at svn.parrot.org
Mon Oct 5 00:56:22 UTC 2009
Author: bacek
Date: Mon Oct 5 00:56:21 2009
New Revision: 41724
URL: https://trac.parrot.org/parrot/changeset/41724
Log:
More accurate handling of Nulls in fill_results.
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 5 00:55:58 2009 (r41723)
+++ branches/pcc_reapply/src/call/args.c Mon Oct 5 00:56:21 2009 (r41724)
@@ -1372,7 +1372,6 @@
err_check = 1;
/* A null call object is fine if there are no returns and no results. */
- /* XXX How can I check for this? Results are stored in call_object...
if (PMC_IS_NULL(call_object)) {
if (result_count > 0) {
if (err_check)
@@ -1381,9 +1380,19 @@
result_count);
}
return;
- } */
+ }
result_list = VTABLE_get_attr_str(interp, call_object, CONST_STRING(interp, "returns"));
+ if (PMC_IS_NULL(result_list)) {
+ if (result_count > 0) {
+ if (err_check)
+ Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
+ "too few returns: 0 passed, %d expected",
+ result_count);
+ }
+ return;
+ }
+
result_sig = VTABLE_get_attr_str(interp, call_object, CONST_STRING(interp, "return_flags"));
result_count = VTABLE_elements(interp, result_sig);
More information about the parrot-commits
mailing list