don't print trailing 0 in strings
[cparser] / symbol_table.c
index 03cbdd5..8f546b3 100644 (file)
@@ -1,6 +1,7 @@
 #include <config.h>
 
 #include "symbol_table_t.h"
+#include "token_t.h"
 #include "adt/hash_string.h"
 #include "adt/obst.h"
 
@@ -9,9 +10,10 @@ struct obstack symbol_obstack;
 static inline
 void init_symbol_table_entry(symbol_t *entry, const char *string)
 {
-       entry->ID     = 0;
-       entry->pp_ID  = 0;
-       entry->string = string;
+       entry->string      = string;
+       entry->ID          = T_IDENTIFIER;
+       entry->pp_ID       = 0;
+       entry->declaration = NULL;
 }
 
 #define HashSet                    symbol_table_t