Skip to content

Commit

Permalink
keywords: shrink struct kwtable
Browse files Browse the repository at this point in the history
* defs/keywords (struct kwtable): shrink since members do not
  exceed 16bit.  lex_state needs to be int (or enum lex_state_e)
  when EXPR_MAX_STATE reaches it.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Jan 21, 2018
1 parent 543ed36 commit 415c334
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion defs/keywords
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%{
struct kwtable {int name, id[2], state;};
struct kwtable {short name, id[2], state;};
const struct kwtable *rb_reserved_word(const char *, unsigned int);
#ifndef RIPPER
static const struct kwtable *reserved_word(/*!ANSI{*/const char *, unsigned int/*}!ANSI*/);
Expand Down
2 changes: 1 addition & 1 deletion defs/lex.c.src
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%{
struct kwtable {int name, id[2], state;};
struct kwtable {short name, id[2], state;};
const struct kwtable *rb_reserved_word(const char *, unsigned int);
#ifndef RIPPER
static const struct kwtable *reserved_word(/*!ANSI{*/const char *, unsigned int/*}!ANSI*/);
Expand Down
2 changes: 1 addition & 1 deletion lex.c.blt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#define gperf_offsetof(s, n) (short)offsetof(struct s##_t, s##_str##n)
#line 1 "defs/keywords"

struct kwtable {int name, id[2], state;};
struct kwtable {short name, id[2], state;};
const struct kwtable *rb_reserved_word(const char *, unsigned int);
#ifndef RIPPER
static const struct kwtable *reserved_word(/*const char *, unsigned int*/);
Expand Down

0 comments on commit 415c334

Please sign in to comment.