aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-13 00:57:42 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-13 00:57:42 +0000
commit23a85687398e0fc620c07ca87237d9b384cee53e (patch)
tree6092a9dbc7d9589f0b284ca308ba90f5e897de2b
parent74947c9d1ee149231b34247d0f930a56f424a4c1 (diff)
downloadruby-23a85687398e0fc620c07ca87237d9b384cee53e.tar.gz
openssl/ossl.h: calculate as long
* ext/openssl/ossl.h (ossl_str_adjust): calculate as long, not casting to int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ext/openssl/ossl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/openssl/ossl.h b/ext/openssl/ossl.h
index 83a927dabe..c843c06f5c 100644
--- a/ext/openssl/ossl.h
+++ b/ext/openssl/ossl.h
@@ -137,8 +137,8 @@ VALUE ossl_x509name_sk2ary(STACK_OF(X509_NAME) *names);
VALUE ossl_buf2str(char *buf, int len);
#define ossl_str_adjust(str, p) \
do{\
- int len = RSTRING_LENINT(str);\
- int newlen = rb_long2int((p) - (unsigned char*)RSTRING_PTR(str));\
+ long len = RSTRING_LEN(str);\
+ long newlen = (long)((p) - (unsigned char*)RSTRING_PTR(str));\
assert(newlen <= len);\
rb_str_set_len((str), newlen);\
}while(0)