1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/json/fbuffer/fbuffer.h (fbuffer_append_str): change the place of

RB_GC_GUARD. it should be after the object is used.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2013-06-07 04:45:16 +00:00
parent b309a3698d
commit cac2f455a9
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Fri Jun 7 13:25:27 2013 NARUSE, Yui <naruse@ruby-lang.org>
* ext/json/fbuffer/fbuffer.h (fbuffer_append_str): change the place of
RB_GC_GUARD. it should be after the object is used.
Fri Jun 7 13:22:43 2013 NARUSE, Yui <naruse@ruby-lang.org>
* gc.c (before_gc_sweep): noinline can also avoid the segv instead of

View file

@ -117,9 +117,9 @@ static void fbuffer_append_str(FBuffer *fb, VALUE str)
const char *newstr = StringValuePtr(str);
unsigned long len = RSTRING_LEN(str);
RB_GC_GUARD(str);
fbuffer_append(fb, newstr, len);
RB_GC_GUARD(str);
}
#endif