diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-23 12:45:23 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-23 12:45:23 +0000 |
commit | c10cff0c5792f0021552e77e9bf845526253392f (patch) | |
tree | b8fa976130d603f8fd7dd5ae6b900b7fe00ae876 /ext | |
parent | 3d8201efed8ef09fe98070e6c15bfb31e20ef71e (diff) | |
download | ruby-c10cff0c5792f0021552e77e9bf845526253392f.tar.gz ruby-c10cff0c5792f0021552e77e9bf845526253392f.tar.xz ruby-c10cff0c5792f0021552e77e9bf845526253392f.zip |
* 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.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/dbm/dbm.c | 3 | ||||
-rw-r--r-- | ext/sdbm/init.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/ext/dbm/dbm.c b/ext/dbm/dbm.c index 7a78f8dad..84d331ae5 100644 --- a/ext/dbm/dbm.c +++ b/ext/dbm/dbm.c @@ -91,7 +91,8 @@ fdbm_alloc(VALUE klass) 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; diff --git a/ext/sdbm/init.c b/ext/sdbm/init.c index 2e4f75cfb..f630dc3cc 100644 --- a/ext/sdbm/init.c +++ b/ext/sdbm/init.c @@ -82,7 +82,8 @@ fsdbm_alloc(VALUE klass) 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; |