summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-01 07:48:53 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-01 07:48:53 +0000
commitcb50168eb02625e80423ebac4a2aca370eabed03 (patch)
treed73c903194db2ad428d8c94b795cbad58a34f44d
parenta7cdd2020404f0a9679d3f8417981e81404a90a7 (diff)
* ext/digest/md5/md5init.c (md5), ext/digest/rmd160/rmd160init.c
(rmd160) ext/digest/sha1/sha1init.c (sha1), ext/digest/sha2/sha2init.c (sha256, sha384, sha512): constified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-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
5 files changed, 14 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index e1ddf83083f..2a21e205d23 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Mon Sep 1 16:48:50 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/digest/md5/md5init.c (md5), ext/digest/rmd160/rmd160init.c
+ (rmd160) ext/digest/sha1/sha1init.c (sha1),
+ ext/digest/sha2/sha2init.c (sha256, sha384, sha512): constified.
+
Mon Sep 1 15:15:40 2008 NARUSE, Yui <naruse@ruby-lang.org>
* enc/trans/japanese.trans: fix mapping priority.
diff --git a/ext/digest/md5/md5init.c b/ext/digest/md5/md5init.c
index 17658f4fce2..d1229b5c6e7 100644
--- a/ext/digest/md5/md5init.c
+++ b/ext/digest/md5/md5init.c
@@ -8,7 +8,7 @@
#include "md5.h"
#endif
-static rb_digest_metadata_t md5 = {
+static const rb_digest_metadata_t md5 = {
RUBY_DIGEST_API_VERSION,
MD5_DIGEST_LENGTH,
MD5_BLOCK_LENGTH,
@@ -36,5 +36,5 @@ Init_md5()
cDigest_MD5 = rb_define_class_under(mDigest, "MD5", cDigest_Base);
rb_ivar_set(cDigest_MD5, rb_intern("metadata"),
- Data_Wrap_Struct(rb_cObject, 0, 0, &md5));
+ Data_Wrap_Struct(rb_cObject, 0, 0, (void *)&md5));
}
diff --git a/ext/digest/rmd160/rmd160init.c b/ext/digest/rmd160/rmd160init.c
index 763867df86c..0839f1b8201 100644
--- a/ext/digest/rmd160/rmd160init.c
+++ b/ext/digest/rmd160/rmd160init.c
@@ -8,7 +8,7 @@
#include "rmd160.h"
#endif
-static rb_digest_metadata_t rmd160 = {
+static const rb_digest_metadata_t rmd160 = {
RUBY_DIGEST_API_VERSION,
RMD160_DIGEST_LENGTH,
RMD160_BLOCK_LENGTH,
@@ -36,5 +36,5 @@ Init_rmd160()
cDigest_RMD160 = rb_define_class_under(mDigest, "RMD160", cDigest_Base);
rb_ivar_set(cDigest_RMD160, rb_intern("metadata"),
- Data_Wrap_Struct(rb_cObject, 0, 0, &rmd160));
+ Data_Wrap_Struct(rb_cObject, 0, 0, (void *)&rmd160));
}
diff --git a/ext/digest/sha1/sha1init.c b/ext/digest/sha1/sha1init.c
index b2146f05a9a..d46a1cd67db 100644
--- a/ext/digest/sha1/sha1init.c
+++ b/ext/digest/sha1/sha1init.c
@@ -8,7 +8,7 @@
#include "sha1.h"
#endif
-static rb_digest_metadata_t sha1 = {
+static const rb_digest_metadata_t sha1 = {
RUBY_DIGEST_API_VERSION,
SHA1_DIGEST_LENGTH,
SHA1_BLOCK_LENGTH,
@@ -36,5 +36,5 @@ Init_sha1()
cDigest_SHA1 = rb_define_class_under(mDigest, "SHA1", cDigest_Base);
rb_ivar_set(cDigest_SHA1, rb_intern("metadata"),
- Data_Wrap_Struct(rb_cObject, 0, 0, &sha1));
+ Data_Wrap_Struct(rb_cObject, 0, 0, (void *)&sha1));
}
diff --git a/ext/digest/sha2/sha2init.c b/ext/digest/sha2/sha2init.c
index c83a29316a8..8b79e950a6c 100644
--- a/ext/digest/sha2/sha2init.c
+++ b/ext/digest/sha2/sha2init.c
@@ -7,7 +7,7 @@
#define FOREACH_BITLEN(func) func(256) func(384) func(512)
#define DEFINE_ALGO_METADATA(bitlen) \
-static rb_digest_metadata_t sha##bitlen = { \
+static const rb_digest_metadata_t sha##bitlen = { \
RUBY_DIGEST_API_VERSION, \
SHA##bitlen##_DIGEST_LENGTH, \
SHA##bitlen##_BLOCK_LENGTH, \
@@ -46,7 +46,7 @@ Init_sha2()
cDigest_SHA##bitlen = rb_define_class_under(mDigest, "SHA" #bitlen, cDigest_Base); \
\
rb_ivar_set(cDigest_SHA##bitlen, id_metadata, \
- Data_Wrap_Struct(rb_cObject, 0, 0, &sha##bitlen));
+ Data_Wrap_Struct(rb_cObject, 0, 0, (void *)&sha##bitlen));
FOREACH_BITLEN(DEFINE_ALGO_CLASS)
}