summaryrefslogtreecommitdiff
path: root/ext/digest/digest.c
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
commit9b81e26df274eb430e66a43408d8e76165e61c3d (patch)
treeb6d6f02e1e9cfd6af77e42d1722667a2b2df295e /ext/digest/digest.c
parenta0d758f8247582bdd46258ca1e240869fb42a9e9 (diff)
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@11133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/digest/digest.c')
-rw-r--r--ext/digest/digest.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/digest/digest.c b/ext/digest/digest.c
index dd78739..b8144f3 100644
--- a/ext/digest/digest.c
+++ b/ext/digest/digest.c
@@ -28,11 +28,11 @@ get_digest_base_metadata(VALUE klass)
VALUE obj;
algo_t *algo;
- if (rb_cvar_defined(klass, id_metadata) == Qfalse) {
+ if (rb_ivar_defined(klass, id_metadata) == Qfalse) {
return NULL;
}
- obj = rb_cvar_get(klass, id_metadata);
+ obj = rb_ivar_get(klass, id_metadata);
Data_Get_Struct(obj, algo_t, algo);