diff options
author | Wim Lewis <wiml@omnigroup.com> | 2014-07-30 12:30:34 -0700 |
---|---|---|
committer | Wim Lewis <wiml@omnigroup.com> | 2014-07-30 12:30:34 -0700 |
commit | ca15fc65504b3029b7a1b42d9a31a7b798b06181 (patch) | |
tree | c2b654195a00f2c2d591a3c9227528bd23af4f36 /skeletons | |
parent | 18c2ec9f1dfdc565dc8c6a1a9d826f5f9a5861b7 (diff) |
Avoid an unnecessary table lookup and its accompanying table (final_chunk_type[]).
Diffstat (limited to 'skeletons')
-rw-r--r-- | skeletons/xer_support.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/skeletons/xer_support.c b/skeletons/xer_support.c index 20f70d58..36b4bfbf 100644 --- a/skeletons/xer_support.c +++ b/skeletons/xer_support.c @@ -22,15 +22,6 @@ typedef enum { ST_COMMENT_CLO_RT /* "-->"[1] */ } pstate_e; -static pxml_chunk_type_e final_chunk_type[] = { - PXML_TEXT, - PXML_TAG_END, - PXML_COMMENT_END, - PXML_TAG_END, - PXML_COMMENT_END, -}; - - static const int _charclass[256] = { 0,0,0,0,0,0,0,0, 0,1,1,0,1,1,0,0, @@ -79,8 +70,11 @@ _charclass[256] = { #define TOKEN_CB(_type, _ns, _current_too) \ TOKEN_CB_CALL(_type, _ns, _current_too, 0) +#define PXML_TAG_FINAL_CHUNK_TYPE PXML_TAG_END +#define PXML_COMMENT_FINAL_CHUNK_TYPE PXML_COMMENT_END + #define TOKEN_CB_FINAL(_type, _ns, _current_too) \ - TOKEN_CB_CALL(final_chunk_type[_type], _ns, _current_too, 1) + TOKEN_CB_CALL( _type ## _FINAL_CHUNK_TYPE , _ns, _current_too, 1) /* * Parser itself |