mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* parse.y (keyword_to_name): constified.
* ext/ripper/eventids2.c (token_to_eventid): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7990a473eb
commit
e8fc29990f
3 changed files with 10 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
|||
Fri Jul 6 14:57:12 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* parse.y (keyword_to_name): constified.
|
||||
|
||||
* ext/ripper/eventids2.c (token_to_eventid): ditto.
|
||||
|
||||
Fri Jul 6 14:50:40 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* bootstraptest/runner.rb: added --quiet option.
|
||||
|
|
|
@ -112,7 +112,7 @@ ripper_init_eventids2(VALUE self)
|
|||
ripper_init_eventids2_table(self);
|
||||
}
|
||||
|
||||
static struct token_assoc {
|
||||
static const struct token_assoc {
|
||||
int token;
|
||||
ID *id;
|
||||
} token_to_eventid[] = {
|
||||
|
@ -264,7 +264,7 @@ static struct token_assoc {
|
|||
static ID
|
||||
ripper_token2eventid(int tok)
|
||||
{
|
||||
struct token_assoc *a;
|
||||
const struct token_assoc *a;
|
||||
|
||||
for (a = token_to_eventid; a->id != NULL; a++) {
|
||||
if (a->token == tok)
|
||||
|
|
4
parse.y
4
parse.y
|
@ -8873,7 +8873,7 @@ ripper_dispatch5(struct parser_params *parser, ID mid, VALUE a, VALUE b, VALUE c
|
|||
return rb_funcall(parser->value, mid, 5, a, b, c, d, e);
|
||||
}
|
||||
|
||||
static struct kw_assoc {
|
||||
static const struct kw_assoc {
|
||||
ID id;
|
||||
const char *name;
|
||||
} keyword_to_name[] = {
|
||||
|
@ -8930,7 +8930,7 @@ static struct kw_assoc {
|
|||
static const char*
|
||||
keyword_id_to_str(ID id)
|
||||
{
|
||||
struct kw_assoc *a;
|
||||
const struct kw_assoc *a;
|
||||
|
||||
for (a = keyword_to_name; a->id; a++) {
|
||||
if (a->id == id)
|
||||
|
|
Loading…
Reference in a new issue