diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-28 15:27:24 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-28 15:27:24 +0000 |
commit | c47b523246c9e3364640f741f642b053f3515653 (patch) | |
tree | 0c72c8f54cd453c73094c535c400f7f6b26c1aa8 /ext/digest | |
parent | ae7eb5fe83f8cc4723b11724447f3cda6c0c03f2 (diff) | |
download | ruby-c47b523246c9e3364640f741f642b053f3515653.tar.gz |
ruby.h: warn untyped Data
* include/ruby/ruby.h (rb_data_object_alloc_warning): warn
Data_Wrap_Struct and Data_Make_Struct only if
RUBY_UNTYPED_DATA_WARNING is set to 1.
* include/ruby/ruby.h (rb_data_object_get_warning): ditto for
Data_Get_Struct.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/digest')
-rw-r--r-- | ext/digest/md5/md5init.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/digest/md5/md5init.c b/ext/digest/md5/md5init.c index 3591782f6e..9ab2855620 100644 --- a/ext/digest/md5/md5init.c +++ b/ext/digest/md5/md5init.c @@ -38,6 +38,8 @@ Init_md5() cDigest_MD5 = rb_define_class_under(mDigest, "MD5", cDigest_Base); +#undef RUBY_UNTYPED_DATA_WARNING +#define RUBY_UNTYPED_DATA_WARNING 0 rb_ivar_set(cDigest_MD5, rb_intern("metadata"), Data_Wrap_Struct(rb_cObject, 0, 0, (void *)&md5)); } |