diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-12-12 00:36:54 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-12-12 00:36:54 +0000 |
commit | e585523a2b60a69befc1562fd4c79cfa688bb197 (patch) | |
tree | 767c941787dfe02766290b092d930237d7c386b6 /ext/digest | |
parent | 62b75bcb283ae38ef769084f88bf4fec352fdc34 (diff) | |
download | ruby-e585523a2b60a69befc1562fd4c79cfa688bb197.tar.gz |
* ext/digest/digest.c (rb_digest_base_s_digest): add volatile to
protect temporary context object. [ruby-dev:27979]
* ext/iconv/iconv.c (Init_iconv): rb_gc_register_address() should
be called before actual variable initialization.
[ruby-dev:27986]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/digest')
-rw-r--r-- | ext/digest/digest.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/digest/digest.c b/ext/digest/digest.c index 70f986327a..ead9da3c10 100644 --- a/ext/digest/digest.c +++ b/ext/digest/digest.c @@ -91,7 +91,7 @@ rb_digest_base_s_digest(klass, str) void *pctx; size_t len; unsigned char *digest; - VALUE obj = rb_digest_base_alloc(klass); + volatile VALUE obj = rb_digest_base_alloc(klass); algo = get_digest_base_metadata(klass); Data_Get_Struct(obj, void, pctx); @@ -120,7 +120,7 @@ rb_digest_base_s_hexdigest(klass, str) void *pctx; size_t len; unsigned char *hexdigest; - VALUE obj = rb_digest_base_alloc(klass); + volatile VALUE obj = rb_digest_base_alloc(klass); algo = get_digest_base_metadata(klass); Data_Get_Struct(obj, void, pctx); |