summaryrefslogtreecommitdiff
path: root/src/state.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2004-12-17 20:29:19 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2004-12-17 20:29:19 +0000
commitf6fbd3da9d1366ccaa0163c6c93dde11e5720262 (patch)
tree049093bb95780a916acc7a8e1ebe946b738d4e3b /src/state.c
parentefeed023277585245908a7554eec5111137164ca (diff)
downloadbison-f6fbd3da9d1366ccaa0163c6c93dde11e5720262.tar.gz
Remove uses of 'short int' and 'unsigned short int' in the parser generators.
* src/LR0.c (allocate_itemsets, new_itemsets, save_reductions): Use size_t, not int or short int, to count objects. * src/closure.c (nritemset, closure): Likewise. * src/closure.h (nritemset, closure): Likewise. * src/nullable.c (nullable_compute): Likewise. * src/print.c (print_core): Likewise. * src/print_graph.c (print_core): Likewise. * src/state.c (state_compare, state_hash): Likewise. * src/state.h (struct state): Likewise. * src/tables.c (default_goto, goto_actions): Likewise. * src/gram.h (rule_number, rule): Use int, not short int. * src/output.c (prepare_rules): Likewise. * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions, errs, reductions): Likewise. * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol): Likewise. * src/tables.c (vector_number, tally, action_number, ACTION_NUMBER_MINIMUM): Likewise. * src/output.c (muscle_insert_short_int_table): Remove.
Diffstat (limited to 'src/state.c')
-rw-r--r--src/state.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/state.c b/src/state.c
index f8d17d1f..6ced8e5a 100644
--- a/src/state.c
+++ b/src/state.c
@@ -261,7 +261,7 @@ static struct hash_table *state_table = NULL;
static inline bool
state_compare (state const *s1, state const *s2)
{
- int i;
+ size_t i;
if (s1->nitems != s2->nitems)
return false;
@@ -284,7 +284,7 @@ state_hash (state const *s, size_t tablesize)
{
/* Add up the state's item numbers to get a hash key. */
size_t key = 0;
- int i;
+ size_t i;
for (i = 0; i < s->nitems; ++i)
key += s->items[i];
return key % tablesize;