develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r34315 - trunk/compilers/imcc

From:
petdance
Date:
December 23, 2008 22:35
Subject:
[svn:parrot] r34315 - trunk/compilers/imcc
Message ID:
20081224063507.D2E41CBA12@x12.develooper.com
Author: petdance
Date: Tue Dec 23 22:35:06 2008
New Revision: 34315

Modified:
   trunk/compilers/imcc/parser_util.c

Log:
fix function header and do some consting

Modified: trunk/compilers/imcc/parser_util.c
==============================================================================
--- trunk/compilers/imcc/parser_util.c	(original)
+++ trunk/compilers/imcc/parser_util.c	Tue Dec 23 22:35:06 2008
@@ -1239,7 +1239,7 @@
 
 /*
 
-=item C<void imcc_destroy_macro_values(void *)>
+=item C<static void imcc_destroy_macro_values>
 
 A callback for parrot_chash_destroy_values() to free all macro-allocated memory.
 
@@ -1250,11 +1250,13 @@
 static void
 imcc_destroy_macro_values(ARGMOD(void *value))
 {
-    macro_t *m = (macro_t *)value;
-    int      i;
+    macro_t *  const m      = (macro_t *)value;
+    params_t * const params = &m->params;
 
-    for (i = 0; i < m->params.num_param; ++i) {
-        char *name = m->params.name[i];
+    int i;
+
+    for (i = 0; i < params->num_param; ++i) {
+        char * const name = params->name[i];
         if (name)
             mem_sys_free(name);
     }



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About