summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/digest/md5/md5init.c4
-rw-r--r--ext/digest/rmd160/rmd160init.c4
-rw-r--r--ext/digest/sha1/sha1init.c4
-rw-r--r--ext/digest/sha2/sha2init.c4
4 files changed, 8 insertions, 8 deletions
diff --git a/ext/digest/md5/md5init.c b/ext/digest/md5/md5init.c
index 0f5b9b35434..90ab707433c 100644
--- a/ext/digest/md5/md5init.c
+++ b/ext/digest/md5/md5init.c
@@ -29,6 +29,6 @@ Init_md5()
id_metadata = rb_intern("metadata");
- rb_cvar_declare(cDigest_MD5, id_metadata,
- Data_Wrap_Struct(rb_cObject, 0, 0, &md5));
+ rb_cvar_set(cDigest_MD5, id_metadata,
+ Data_Wrap_Struct(rb_cObject, 0, 0, &md5), Qtrue);
}
diff --git a/ext/digest/rmd160/rmd160init.c b/ext/digest/rmd160/rmd160init.c
index 3cfe9e3df71..6955c2b64b9 100644
--- a/ext/digest/rmd160/rmd160init.c
+++ b/ext/digest/rmd160/rmd160init.c
@@ -29,6 +29,6 @@ Init_rmd160()
id_metadata = rb_intern("metadata");
- rb_cvar_declare(cDigest_RMD160, id_metadata,
- Data_Wrap_Struct(rb_cObject, 0, 0, &rmd160));
+ rb_cvar_set(cDigest_RMD160, id_metadata,
+ Data_Wrap_Struct(rb_cObject, 0, 0, &rmd160), Qtrue);
}
diff --git a/ext/digest/sha1/sha1init.c b/ext/digest/sha1/sha1init.c
index ecf4aeb198b..70bc4f9f524 100644
--- a/ext/digest/sha1/sha1init.c
+++ b/ext/digest/sha1/sha1init.c
@@ -29,6 +29,6 @@ Init_sha1()
id_metadata = rb_intern("metadata");
- rb_cvar_declare(cDigest_SHA1, id_metadata,
- Data_Wrap_Struct(rb_cObject, 0, 0, &sha1));
+ rb_cvar_set(cDigest_SHA1, id_metadata,
+ Data_Wrap_Struct(rb_cObject, 0, 0, &sha1), Qtrue);
}
diff --git a/ext/digest/sha2/sha2init.c b/ext/digest/sha2/sha2init.c
index d7666aadf9e..4b140318117 100644
--- a/ext/digest/sha2/sha2init.c
+++ b/ext/digest/sha2/sha2init.c
@@ -40,8 +40,8 @@ Init_sha2()
#define DEFINE_ALGO_CLASS(bitlen) \
cDigest_SHA##bitlen = rb_define_class_under(mDigest, "SHA" #bitlen, cDigest_Base); \
\
- rb_cvar_declare(cDigest_SHA##bitlen, id_metadata, \
- Data_Wrap_Struct(rb_cObject, 0, 0, &sha##bitlen));
+ rb_cvar_set(cDigest_SHA##bitlen, id_metadata, \
+ Data_Wrap_Struct(rb_cObject, 0, 0, &sha##bitlen), Qtrue);
FOREACH_BITLEN(DEFINE_ALGO_CLASS)
}