aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/ossl_bn.c
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2016-08-22 18:02:30 +0900
committerKazuki Yamaguchi <k@rhe.jp>2016-08-22 18:02:30 +0900
commitbe23fc960337e475af70419c5036cce215fd9ac9 (patch)
tree5ace9a5afd0de9e7dcba15b6a416f9e52f1d578d /ext/openssl/ossl_bn.c
parentb099663eb81f4ef6ff8963271a04442cef2667dd (diff)
downloadruby-openssl-be23fc960337e475af70419c5036cce215fd9ac9.tar.gz
Avoid using *2FIX() where we don't know if it really fits in Fixnum
Diffstat (limited to 'ext/openssl/ossl_bn.c')
-rw-r--r--ext/openssl/ossl_bn.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/openssl/ossl_bn.c b/ext/openssl/ossl_bn.c
index bbbc5f04..c5eb362c 100644
--- a/ext/openssl/ossl_bn.c
+++ b/ext/openssl/ossl_bn.c
@@ -807,7 +807,7 @@ ossl_bn_s_generate_prime(int argc, VALUE *argv, VALUE klass)
{ \
BIGNUM *bn; \
GetBN(self, bn); \
- return INT2FIX(BN_##func(bn)); \
+ return INT2NUM(BN_##func(bn)); \
}
/*
@@ -848,7 +848,7 @@ ossl_bn_copy(VALUE self, VALUE other)
{ \
BIGNUM *bn1, *bn2 = GetBNPtr(other); \
GetBN(self, bn1); \
- return INT2FIX(BN_##func(bn1, bn2)); \
+ return INT2NUM(BN_##func(bn1, bn2)); \
}
/*