summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcharliesome <charliesome@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-02 13:16:35 +0000
committercharliesome <charliesome@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-02 13:16:35 +0000
commitd74bb62dcceff8810cc60097adfe324ef9dbebc0 (patch)
tree26e50fa74e6b24b05b579abd8e21763aabf001f6
parent4658478ae1b0023c9ad17a67e98fb81b2c3b941c (diff)
* bignum.c (rb_cstr_to_inum): fix 64 bit to 32 bit shorten warning
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--bignum.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/bignum.c b/bignum.c
index 8c80c3da64..7ecfb89a86 100644
--- a/bignum.c
+++ b/bignum.c
@@ -2107,8 +2107,8 @@ rb_cstr_to_inum(const char *str, int base, int badcheck)
vds = uds + num_bdigits;
powerv = bignew(2, 1);
- BDIGITS(powerv)[0] = BIGLO(power);
- BDIGITS(powerv)[1] = BIGDN(power);
+ BDIGITS(powerv)[0] = (BDIGIT)BIGLO(power);
+ BDIGITS(powerv)[1] = (BDIGIT)BIGDN(power);
i = 0;
while (buf < p) {
@@ -2124,8 +2124,8 @@ rb_cstr_to_inum(const char *str, int base, int badcheck)
for (j = 0; j < m; j++) {
d = d * base + p[j];
}
- uds[i++] = BIGLO(d);
- uds[i++] = BIGDN(d);
+ uds[i++] = (BDIGIT)BIGLO(d);
+ uds[i++] = (BDIGIT)BIGDN(d);
}
for (unit = 2; unit < num_bdigits; unit *= 2) {
for (i = 0; i < num_bdigits; i += unit*2) {