summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2010-05-26 15:53:05 -0700
committerCarl Worth <cworth@cworth.org>2010-05-26 15:53:05 -0700
commit0324cad796b7a68634a729719f08fcbb5bbd04cc (patch)
tree79c72c745c65ed680acd71fc3b440164236a59a8
parent8e82fcb070d5fae0ec2c763cee4cea225b459664 (diff)
All macro lookups should be of type macro_t, not string_list_t.
This is what I get for using a non-type-safe hash-table implementation.
-rw-r--r--glcpp-parse.y8
1 files changed, 4 insertions, 4 deletions
diff --git a/glcpp-parse.y b/glcpp-parse.y
index cce8a70..a809ebf 100644
--- a/glcpp-parse.y
+++ b/glcpp-parse.y
@@ -199,7 +199,7 @@ control_line:
_define_function_macro (parser, $2, $4, $6);
}
| HASH_UNDEF IDENTIFIER NEWLINE {
- string_list_t *macro = hash_table_find (parser->defines, $2);
+ macro_t *macro = hash_table_find (parser->defines, $2);
if (macro) {
/* XXX: Need hash table to support a real way
* to remove an element rather than prefixing
@@ -222,12 +222,12 @@ control_line:
glcpp_parser_lex_from (parser, expanded);
}
| HASH_IFDEF IDENTIFIER NEWLINE {
- string_list_t *macro = hash_table_find (parser->defines, $2);
+ macro_t *macro = hash_table_find (parser->defines, $2);
talloc_free ($2);
_glcpp_parser_skip_stack_push_if (parser, macro != NULL);
}
| HASH_IFNDEF IDENTIFIER NEWLINE {
- string_list_t *macro = hash_table_find (parser->defines, $2);
+ macro_t *macro = hash_table_find (parser->defines, $2);
talloc_free ($2);
_glcpp_parser_skip_stack_push_if (parser, macro == NULL);
}
@@ -889,7 +889,7 @@ _glcpp_parser_evaluate_defined (glcpp_parser_t *parser,
token_list_t *list)
{
token_node_t *node, *next;
- string_list_t *macro;
+ macro_t *macro;
if (list == NULL)
return;