mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
a0d758f824
commit
9b81e26df2
6 changed files with 25 additions and 10 deletions
|
@ -41,8 +41,8 @@ Init_sha2()
|
|||
rb_define_const(cDigest_SHA##bitlen, "DIGEST_LENGTH", INT2NUM(SHA##bitlen##_DIGEST_LENGTH)); \
|
||||
rb_define_const(cDigest_SHA##bitlen, "BLOCK_LENGTH", INT2NUM(SHA##bitlen##_BLOCK_LENGTH)); \
|
||||
\
|
||||
rb_cvar_set(cDigest_SHA##bitlen, id_metadata, \
|
||||
Data_Wrap_Struct(rb_cObject, 0, 0, &sha##bitlen), Qtrue);
|
||||
rb_ivar_set(cDigest_SHA##bitlen, id_metadata, \
|
||||
Data_Wrap_Struct(rb_cObject, 0, 0, &sha##bitlen));
|
||||
|
||||
FOREACH_BITLEN(DEFINE_ALGO_CLASS)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue