[svn:parrot] r40747 - branches/pcc_arg_unify/src
allison at svn.parrot.org
allison at svn.parrot.org
Mon Aug 24 01:55:16 UTC 2009
Author: allison
Date: Mon Aug 24 01:55:15 2009
New Revision: 40747
URL: https://trac.parrot.org/parrot/changeset/40747
Log:
[pcc] Better error checking for null signature string in call signature
object.
Modified:
branches/pcc_arg_unify/src/multidispatch.c
Modified: branches/pcc_arg_unify/src/multidispatch.c
==============================================================================
--- branches/pcc_arg_unify/src/multidispatch.c Mon Aug 24 01:50:45 2009 (r40746)
+++ branches/pcc_arg_unify/src/multidispatch.c Mon Aug 24 01:55:15 2009 (r40747)
@@ -659,10 +659,17 @@
ASSERT_ARGS(Parrot_mmd_build_type_tuple_from_sig_obj)
PMC * const type_tuple = pmc_new(interp, enum_class_ResizableIntegerArray);
STRING *string_sig = VTABLE_get_string(interp, sig_obj);
- const INTVAL sig_len = Parrot_str_byte_length(interp, string_sig);
INTVAL tuple_size = 0;
INTVAL args_ended = 0;
INTVAL i, seen_invocant = 0;
+ INTVAL sig_len;
+
+ if (STRING_IS_NULL(string_sig)) {
+ Parrot_ex_throw_from_c_args(interp, NULL, 1,
+ "Call has no signature, unable to dispatch.\n");
+ }
+
+ sig_len = Parrot_str_byte_length(interp, string_sig);
for (i = 0; i < sig_len; ++i) {
INTVAL type = Parrot_str_indexed(interp, string_sig, i + seen_invocant);
More information about the parrot-commits
mailing list