summaryrefslogtreecommitdiff
path: root/ext/json/fbuffer
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-15 07:37:45 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-15 07:37:45 +0000
commit164ced04de494d709f9006cac920579d84b6befd (patch)
treef392aea78209d3110032434710b3a1ac9b40e0ab /ext/json/fbuffer
parent57fb2199059cb55b632d093c2e64c8a3c60acfbb (diff)
Add debug prints to inspect TC_JSONGenerate#test_gc's timeout issue.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/json/fbuffer')
-rw-r--r--ext/json/fbuffer/fbuffer.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/json/fbuffer/fbuffer.h b/ext/json/fbuffer/fbuffer.h
index 3ff928856d..47e0c07004 100644
--- a/ext/json/fbuffer/fbuffer.h
+++ b/ext/json/fbuffer/fbuffer.h
@@ -68,6 +68,7 @@ static void fbuffer_inc_capa(FBuffer *fb, unsigned long requested)
if (!fb->ptr) {
fb->ptr = ALLOC_N(char, fb->initial_length);
fb->capa = fb->initial_length;
+ fb->len = 0;
}
for (required = fb->capa; requested > required - fb->len; required <<= 1);