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

allison at svn.parrot.org allison at svn.parrot.org
Sun Oct 4 17:22:30 UTC 2009


Author: allison
Date: Sun Oct  4 17:22:30 2009
New Revision: 41700
URL: https://trac.parrot.org/parrot/changeset/41700

Log:
[pcc] Don't declare variable until limited scope where it's used.

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

Modified: branches/pcc_reapply/src/call/args.c
==============================================================================
--- branches/pcc_reapply/src/call/args.c	Sun Oct  4 17:05:14 2009	(r41699)
+++ branches/pcc_reapply/src/call/args.c	Sun Oct  4 17:22:30 2009	(r41700)
@@ -725,7 +725,6 @@
 {
     ASSERT_ARGS(fill_params)
     PMC    *ctx = CURRENT_CONTEXT(interp);
-    PMC    *named_arg_list;
     PMC    *named_used_list = PMCNULL;
     INTVAL  param_count     = VTABLE_elements(interp, raw_sig);
     INTVAL  positional_args;
@@ -1042,7 +1041,8 @@
 
     /* Double check that all named arguments were assigned to parameters. */
     if (err_check) {
-        named_arg_list = VTABLE_get_attr_str(interp, call_object, CONST_STRING(interp, "named"));
+        PMC *named_arg_list = VTABLE_get_attr_str(interp,
+                call_object, CONST_STRING(interp, "named"));
         if (!PMC_IS_NULL(named_arg_list)) {
             INTVAL named_arg_count = VTABLE_elements(interp, named_arg_list);
             if (named_arg_count > named_count) {


More information about the parrot-commits mailing list