diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2002-12-13 08:39:01 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2002-12-13 08:39:01 +0000 |
commit | 2073d76939966ccfc00b29dc63d25b59741c0c93 (patch) | |
tree | 8c8cf1f1a18e5f1289e1a7826f8099a05cc0e737 /src/state.h | |
parent | 03b9e27342b94ef7a83bff78259fd8415f00584a (diff) | |
download | bison-2073d76939966ccfc00b29dc63d25b59741c0c93.tar.gz |
(state_number_as_int): Now inline functions rather than macros, to avoid casts.
Diffstat (limited to 'src/state.h')
-rw-r--r-- | src/state.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/state.h b/src/state.h index 6b0a3de1..1e49bb38 100644 --- a/src/state.h +++ b/src/state.h @@ -1,4 +1,4 @@ -/* Type definitions for nondeterministic finite state machine for bison, +/* Type definitions for nondeterministic finite state machine for Bison. Copyright (C) 1984, 1989, 2000, 2001, 2002 Free Software Foundation, Inc. @@ -98,7 +98,11 @@ typedef short state_number; # define STATE_NUMBER_MAXIMUM SHRT_MAX /* Be ready to map a state_number to an int. */ -# define state_number_as_int(Tok) ((int) (Tok)) +static inline int +state_number_as_int (state_number s) +{ + return s; +} typedef struct state state; |