diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2004-06-10 20:49:51 +0000 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2004-06-10 20:49:51 +0000 |
commit | 89a7ade0e845548f6cbc1af9250de7414b17b44a (patch) | |
tree | fe5855075bbf247bbe680d7bcb87dbd82a833d48 /mixlib | |
parent | fc20f5c2420d121825e0515527e52e57d7ac2be0 (diff) | |
download | mdk-89a7ade0e845548f6cbc1af9250de7414b17b44a.tar.gz mdk-89a7ade0e845548f6cbc1af9250de7414b17b44a.tar.bz2 |
(mix_parser_compile): correctly set the loc pointer.
Diffstat (limited to 'mixlib')
-rw-r--r-- | mixlib/mix_parser.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mixlib/mix_parser.c b/mixlib/mix_parser.c index 897ef7b..c99e971 100644 --- a/mixlib/mix_parser.c +++ b/mixlib/mix_parser.c @@ -99,7 +99,7 @@ mix_parser_src_file_extension (const mix_parser_t *parser) static gint compare_shorts_ (gconstpointer s1, gconstpointer s2) { - mix_short_t a = (mix_short_t)GPOINTER_TO_UINT(s1); + mix_short_t a = (mix_short_t)GPOINTER_TO_UINT (s1); mix_short_t b = (mix_short_t)GPOINTER_TO_UINT (s2); if ( mix_short_sign (a) == mix_short_sign (b) ) return mix_short_magnitude (a) - mix_short_magnitude (b); @@ -138,6 +138,8 @@ mix_parser_new (const gchar *in_file) } result->in_file = f; result->loc_count = MIX_SHORT_ZERO; + result->start = MIX_SHORT_ZERO; + result->end = MIX_SHORT_ZERO; result->status = MIX_PERR_NOCOMP; result->err_line = 0; result->err_count = 0; @@ -265,10 +267,10 @@ mix_parser_compile (mix_parser_t *parser) if ( parser->status == MIX_PERR_OK ) { + parser->loc_count = parser->end; mix_symbol_table_foreach (parser->ls_table, update_ls_, (gpointer)parser); if ( g_hash_table_size (parser->future_refs) > 0) { - parser->loc_count--; g_hash_table_foreach_remove (parser->future_refs, undef_warning_, (gpointer)parser); } |