summaryrefslogtreecommitdiff
path: root/ext/digest
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-04-08 16:06:30 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-04-08 16:28:38 +0900
commitd8720eb7de9cd9d874b621f214c27022e17cc941 (patch)
treea0a448d47f614493d8a6bb9aabaca9a7cf9870e7 /ext/digest
parent6163a4e1b33ed7df27d0c37e835ce04407857a16 (diff)
Suppress -Wshorten-64-to-32 warnings
Diffstat (limited to 'ext/digest')
-rw-r--r--ext/digest/digest.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/digest/digest.c b/ext/digest/digest.c
index a59f880ac7..cde0dfa005 100644
--- a/ext/digest/digest.c
+++ b/ext/digest/digest.c
@@ -406,7 +406,7 @@ rb_digest_instance_digest_length(VALUE self)
/* never blindly assume that #digest() returns a string */
StringValue(digest);
- return INT2NUM(RSTRING_LEN(digest));
+ return LONG2NUM(RSTRING_LEN(digest));
}
/*
@@ -725,7 +725,7 @@ rb_digest_base_digest_length(VALUE self)
algo = get_digest_obj_metadata(self);
- return INT2NUM(algo->digest_len);
+ return SIZET2NUM(algo->digest_len);
}
/*
@@ -740,7 +740,7 @@ rb_digest_base_block_length(VALUE self)
algo = get_digest_obj_metadata(self);
- return INT2NUM(algo->block_len);
+ return SIZET2NUM(algo->block_len);
}
void