summaryrefslogtreecommitdiff
path: root/ext/sdbm
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-23 12:45:23 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-23 12:45:23 +0000
commit38d2bcd952d9768d0a920facb8d5660f6daf5ca2 (patch)
treeb8fa976130d603f8fd7dd5ae6b900b7fe00ae876 /ext/sdbm
parent61e6f9b81c621d2f55e00590bbb7b44fe6431b25 (diff)
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@23057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/sdbm')
-rw-r--r--ext/sdbm/init.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/sdbm/init.c b/ext/sdbm/init.c
index 2e4f75cfbf..f630dc3cc9 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;