[前][次][番号順一覧][スレッド一覧]

ruby-changes:32501

From: nobu <ko1@a...>
Date: Mon, 13 Jan 2014 09:57:55 +0900 (JST)
Subject: [ruby-changes:32501] nobu:r44582 (trunk): openssl/ossl.h: calculate as long

nobu	2014-01-13 09:57:42 +0900 (Mon, 13 Jan 2014)

  New Revision: 44582

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44582

  Log:
    openssl/ossl.h: calculate as long
    
    * ext/openssl/ossl.h (ossl_str_adjust): calculate as long, not
      casting to int.

  Modified files:
    trunk/ext/openssl/ossl.h
Index: ext/openssl/ossl.h
===================================================================
--- ext/openssl/ossl.h	(revision 44581)
+++ ext/openssl/ossl.h	(revision 44582)
@@ -137,8 +137,8 @@ VALUE ossl_x509name_sk2ary(STACK_OF(X509 https://github.com/ruby/ruby/blob/trunk/ext/openssl/ossl.h#L137
 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)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]