From 23a85687398e0fc620c07ca87237d9b384cee53e Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 13 Jan 2014 00:57:42 +0000 Subject: 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 --- ext/openssl/ossl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext') 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) -- cgit v1.2.3