keywords: make name singed
* defs/keywords (kwtable::name): turn into singed int, as gperf fills invalid slots with -1. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b147b5a3b8
commit
b907c6e925
@ -328,7 +328,7 @@ lex.c: defs/keywords
|
|||||||
else \
|
else \
|
||||||
[ $(Q) ] && echo generating $@ || set -x; \
|
[ $(Q) ] && echo generating $@ || set -x; \
|
||||||
gperf -C -P -p -j1 -i 1 -g -o -t -N rb_reserved_word -k1,3,$$ $? \
|
gperf -C -P -p -j1 -i 1 -g -o -t -N rb_reserved_word -k1,3,$$ $? \
|
||||||
| sed 's/(int)(long)&((\(struct stringpool_t\) *\*)0)->\(stringpool_[a-z0-9]*\)/offsetof(\1, \2)/g' \
|
| sed 's/(long)&((\(struct stringpool_t\) *\*)0)->\(stringpool_[a-z0-9]*\)/offsetof(\1, \2)/g' \
|
||||||
> $@.tmp && \
|
> $@.tmp && \
|
||||||
$(MV) $@.tmp $@ && \
|
$(MV) $@.tmp $@ && \
|
||||||
$(CP) $? $(srcdir)/defs/lex.c.src && \
|
$(CP) $? $(srcdir)/defs/lex.c.src && \
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
%{
|
%{
|
||||||
struct kwtable {unsigned int name, id[2], state;};
|
struct kwtable {int name, id[2], state;};
|
||||||
const struct kwtable *rb_reserved_word(const char *, unsigned int);
|
const struct kwtable *rb_reserved_word(const char *, unsigned int);
|
||||||
#ifndef RIPPER
|
#ifndef RIPPER
|
||||||
static const struct kwtable *reserved_word(const char *, unsigned int);
|
static const struct kwtable *reserved_word(const char *, unsigned int);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
%{
|
%{
|
||||||
struct kwtable {unsigned int name, id[2], state;};
|
struct kwtable {int name, id[2], state;};
|
||||||
const struct kwtable *rb_reserved_word(const char *, unsigned int);
|
const struct kwtable *rb_reserved_word(const char *, unsigned int);
|
||||||
#ifndef RIPPER
|
#ifndef RIPPER
|
||||||
static const struct kwtable *reserved_word(const char *, unsigned int);
|
static const struct kwtable *reserved_word(const char *, unsigned int);
|
||||||
|
@ -30,7 +30,7 @@ error "gperf generated tables don't work with this execution character set. Plea
|
|||||||
|
|
||||||
#line 1 "defs/keywords"
|
#line 1 "defs/keywords"
|
||||||
|
|
||||||
struct kwtable {unsigned int name, id[2], state;};
|
struct kwtable {int name, id[2], state;};
|
||||||
const struct kwtable *rb_reserved_word(const char *, unsigned int);
|
const struct kwtable *rb_reserved_word(const char *, unsigned int);
|
||||||
#ifndef RIPPER
|
#ifndef RIPPER
|
||||||
static const struct kwtable *reserved_word(const char *, unsigned int);
|
static const struct kwtable *reserved_word(const char *, unsigned int);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user