summaryrefslogtreecommitdiffstats
path: root/ext/digest/sha1
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-11 17:14:54 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-11 17:14:54 +0000
commit960e6ec4155db284d7446f45b34bfabfedad1ea5 (patch)
treeb6d6f02e1e9cfd6af77e42d1722667a2b2df295e /ext/digest/sha1
parentb761d20ec07d6dc0154692152b624300c08b0626 (diff)
downloadruby-960e6ec4155db284d7446f45b34bfabfedad1ea5.tar.gz
ruby-960e6ec4155db284d7446f45b34bfabfedad1ea5.tar.xz
ruby-960e6ec4155db284d7446f45b34bfabfedad1ea5.zip
* ext/digest/digest.c (get_digest_base_metadata): Use an instance
variable of a class object instead of a class variable for metadata. This change is crucial for ruby 1.8 and applying it also to the trunk will assure compatibilities. * ext/digest/md5/md5init.c (Init_md5): Ditto. * ext/digest/rmd160/rmd160init.c (Init_rmd160): Ditto. * ext/digest/sha1/sha1init.c (Init_sha1): Ditto. * ext/digest/sha2/sha2init.c (Init_sha2): Ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/digest/sha1')
-rw-r--r--ext/digest/sha1/sha1init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/digest/sha1/sha1init.c b/ext/digest/sha1/sha1init.c
index bd92c5940..e56f18bf6 100644
--- a/ext/digest/sha1/sha1init.c
+++ b/ext/digest/sha1/sha1init.c
@@ -31,6 +31,6 @@ Init_sha1()
rb_define_const(cDigest_SHA1, "DIGEST_LENGTH", INT2NUM(SHA1_DIGEST_LENGTH));
rb_define_const(cDigest_SHA1, "BLOCK_LENGTH", INT2NUM(SHA1_BLOCK_LENGTH));
- rb_cvar_set(cDigest_SHA1, rb_intern("metadata"),
- Data_Wrap_Struct(rb_cObject, 0, 0, &sha1), Qtrue);
+ rb_ivar_set(cDigest_SHA1, rb_intern("metadata"),
+ Data_Wrap_Struct(rb_cObject, 0, 0, &sha1));
}