ruby-changes:11432
From: knu <ko1@a...>
Date: Mon, 23 Mar 2009 21:45:35 +0900 (JST)
Subject: [ruby-changes:11432] Ruby:r23057 (trunk): * ext/dbm/dbm.c (fdbm_initialize): Make the file variable
knu 2009-03-23 21:45:23 +0900 (Mon, 23 Mar 2009) New Revision: 23057 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23057 Log: * ext/dbm/dbm.c (fdbm_initialize): Make the file variable volatile, because FilePathValue() currently does not protect the given variable from GC. (Probably it should) * ext/sdbm/init.c (fsdbm_initialize): Ditto. Modified files: trunk/ChangeLog trunk/ext/dbm/dbm.c trunk/ext/sdbm/init.c Index: ChangeLog =================================================================== --- ChangeLog (revision 23056) +++ ChangeLog (revision 23057) @@ -1,3 +1,11 @@ +Mon Mar 23 21:41:14 2009 Akinori MUSHA <knu@i...> + + * ext/dbm/dbm.c (fdbm_initialize): Make the file variable + volatile, because FilePathValue() currently does not protect the + given variable from GC. (Probably it should) + + * ext/sdbm/init.c (fsdbm_initialize): Ditto. + Mon Mar 23 19:22:14 2009 Akinori MUSHA <knu@i...> * file.c (rb_file_s_lstat): Back out. Index: ext/sdbm/init.c =================================================================== --- ext/sdbm/init.c (revision 23056) +++ ext/sdbm/init.c (revision 23057) @@ -82,7 +82,8 @@ static VALUE fsdbm_initialize(int argc, VALUE *argv, VALUE obj) { - VALUE file, vmode; + volatile VALUE file; + VALUE vmode; DBM *dbm; struct dbmdata *dbmp; int mode; Index: ext/dbm/dbm.c =================================================================== --- ext/dbm/dbm.c (revision 23056) +++ ext/dbm/dbm.c (revision 23057) @@ -91,7 +91,8 @@ static VALUE fdbm_initialize(int argc, VALUE *argv, VALUE obj) { - VALUE file, vmode, vflags; + volatile VALUE file; + VALUE vmode, vflags; DBM *dbm; struct dbmdata *dbmp; int mode, flags = 0; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/