]> git.saurik.com Git - bison.git/commit - src/state.c
(state_compare): Now inline. Return bool, not int.
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 13 Dec 2002 08:37:52 +0000 (08:37 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 13 Dec 2002 08:37:52 +0000 (08:37 +0000)
commit03b9e27342b94ef7a83bff78259fd8415f00584a
tree7e2cf7a56e2e15598c1cff164c9c8da0cfeb125f
parent3b1e470c6dbdea50e01949e5b6ae7aab17402fe9
(state_compare): Now inline.  Return bool, not int.
(state_comparator, stage_hasher): New function, to avoid casts.
(state_hash_new): Use new functions instead of casting old functions unportably.
(state_hash_lookup): Use MALLOC rather than alloca, so that we don't
have to worry about alloca.
(TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
STATE_ALLOC): Remove.
(transitions_new, errs_new, reductions_new, state_new): Use malloc
rather than calloc, and use offsetof to avoid allocating slightly
too much storage.
(state_new): Initialize all members.
(state_hash): Use unsigned accumulator, not signed.
src/state.c