summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-09 00:50:36 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-09 00:50:36 +0000
commit7021db80f3927faf596ee261e196656a7b5b38d9 (patch)
tree8137103d84fdb75c6bf711dd7a269f3737de0093
parentc8892037c7af9f4b52a692ea7db2f7062b6969e4 (diff)
* ext/json/generator/generator.c (fbuffer_inc_capa):
fix tha use of REALLOC_N. [ruby-dev:41227] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--ext/json/generator/generator.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index f1c132fe34f..2ef63346a42 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun May 9 08:32:56 2010 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * ext/json/generator/generator.c (fbuffer_inc_capa):
+ fix tha use of REALLOC_N. [ruby-dev:41227]
+
Sun May 9 09:30:09 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/json/{generator/generator.c,parser/parser.rl}: fixed indent.
diff --git a/ext/json/generator/generator.c b/ext/json/generator/generator.c
index 12e35d10e15..b25c94f8e92 100644
--- a/ext/json/generator/generator.c
+++ b/ext/json/generator/generator.c
@@ -339,7 +339,7 @@ static void fbuffer_inc_capa(FBuffer *fb, unsigned int requested)
for (required = fb->capa; requested > required - fb->len; required <<= 1);
if (required > fb->capa) {
- fb->ptr = (char *) REALLOC_N((long*) fb->ptr, char, required);
+ REALLOC_N(fb->ptr, char, required);
fb->capa = required;
}
}