summaryrefslogtreecommitdiff
path: root/ext/digest/sha2/sha2init.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-12-17 11:02:31 +0900
committerKenta Murata <mrkn@mrkn.jp>2020-12-19 15:08:01 +0900
commitfeacae193ca3856b1d326697835357791a6df12b (patch)
treec24fc99334ad1832d2442b1ff8857bde754258cf /ext/digest/sha2/sha2init.c
parent5b2cf7eac89550fc88aea45ad2a9dfe9a261c2b1 (diff)
[digest] Added rb_digest_make_metadata to wrap metadata
https://github.com/ruby/digest/commit/7046fe6005
Diffstat (limited to 'ext/digest/sha2/sha2init.c')
-rw-r--r--ext/digest/sha2/sha2init.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/digest/sha2/sha2init.c b/ext/digest/sha2/sha2init.c
index aad7b65..6ed275e 100644
--- a/ext/digest/sha2/sha2init.c
+++ b/ext/digest/sha2/sha2init.c
@@ -47,9 +47,7 @@ Init_sha2(void)
cDigest_SHA##bitlen = rb_define_class_under(mDigest, "SHA" #bitlen, cDigest_Base); \
\
rb_ivar_set(cDigest_SHA##bitlen, id_metadata, \
- Data_Wrap_Struct(0, 0, 0, (void *)&sha##bitlen));
+ rb_digest_make_metadata(&sha##bitlen));
-#undef RUBY_UNTYPED_DATA_WARNING
-#define RUBY_UNTYPED_DATA_WARNING 0
FOREACH_BITLEN(DEFINE_ALGO_CLASS)
}