summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-21 17:27:56 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-21 17:27:56 +0000
commitb524523217b51e864c010646ffd5cbc4154d2fd3 (patch)
tree70844b11aaa2e3c6d67f9628e4b011a322900039 /parse.y
parent1d78315845bcc7800315acbeb6b0a804e745a257 (diff)
Merge from ruby_1_8.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y7
1 files changed, 4 insertions, 3 deletions
diff --git a/parse.y b/parse.y
index 37a61df..1d32a7b 100644
--- a/parse.y
+++ b/parse.y
@@ -6128,6 +6128,7 @@ rb_id2name(id)
ID id;
{
char *name;
+ st_data_t data;
if (id < tLAST_TOKEN) {
int i;
@@ -6138,8 +6139,8 @@ rb_id2name(id)
}
}
- if (st_lookup(sym_rev_tbl, id, (st_data_t *)&name))
- return name;
+ if (st_lookup(sym_rev_tbl, id, &data))
+ return (char *)data;
if (is_attrset_id(id)) {
ID id2 = (id & ~ID_SCOPE_MASK) | ID_LOCAL;
@@ -6352,7 +6353,7 @@ rb_parser_free(ptr)
{
NODE **prev = &parser_heap, *n;
- while (n = *prev) {
+ while ((n = *prev) != 0) {
if (n->u1.node == ptr) {
*prev = n->u2.node;
rb_gc_force_recycle((VALUE)n);