summaryrefslogtreecommitdiffstats
path: root/parse.y
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
commitf5dd3bce9dff8035a35ac6b8797f6595c1083840 (patch)
tree9fda5371ebe7e5d12e5789702cd64854d5f77984 /parse.y
parentab9837bcc2b335280452257aa669c23ff1b1fff0 (diff)
downloadruby-f5dd3bce9dff8035a35ac6b8797f6595c1083840.tar.gz
ruby-f5dd3bce9dff8035a35ac6b8797f6595c1083840.tar.xz
ruby-f5dd3bce9dff8035a35ac6b8797f6595c1083840.zip
* parse.y (HEAPCNT): bison allocates indivisible size.
fixed: [ruby-core:06261] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index 12a1cca4f..3a7af5455 100644
--- a/parse.y
+++ b/parse.y
@@ -6108,7 +6108,7 @@ rb_lastline_set(val)
}
#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)parser_heap, cnt)
#define ADD2HEAP(n, ptr) ((parser_heap = (n))->u1.node = (ptr))