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);
}