summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-10-13 14:26:00 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-10-13 14:26:00 +0000
commitee499a8745c36e36ab9ce6ea619525b496b6bb42 (patch)
tree73df1cfc7876d0d1963e3f8a8eb2e56c34da10b7
parentff2b8b31c2d1646034f227ab99927b1714f41cb2 (diff)
* parse.y (HEAPCNT): bison allocates indivisible size.
fixed: [ruby-core:06261] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--parse.y2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 103873f570..95b12e9ebb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Oct 13 23:25:10 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * parse.y (HEAPCNT): bison allocates indivisible size.
+ fixed: [ruby-core:06261]
+
Wed Oct 12 12:51:56 2005 GOTOU Yuuzou <gotoyuzo@notwork.org>
* ext/openssl/ossl.c (Init_openssl): should call
diff --git a/parse.y b/parse.y
index 86dcfc7cc8..a5673603d4 100644
--- a/parse.y
+++ b/parse.y
@@ -8642,7 +8642,7 @@ rb_parser_end_seen_p(VALUE vparser)
}
#ifdef YYMALLOC
-#define HEAPCNT(n, size) ((size) % sizeof(YYSTYPE) ? 0 : (n) * (size) / sizeof(YYSTYPE))
+#define HEAPCNT(n, size) ((n) * (size) / sizeof(YYSTYPE))
#define NEWHEAP(cnt) rb_node_newnode(NODE_ALLOCA, 0, (VALUE)parserp->heap, cnt)
#define ADD2HEAP(n, ptr) ((parserp->heap = (n))->u1.node = (ptr))