From 52912db4a81f9b9b69ab9e9fcd95e22d086d4289 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 4 Nov 2015 07:18:01 +0000 Subject: ext: adjust index type * ext: use long for index instead of int and RARRAY_LENINT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/openssl/ossl_ocsp.c | 4 ++-- ext/openssl/ossl_ssl.c | 3 ++- ext/openssl/ossl_x509cert.c | 2 +- ext/openssl/ossl_x509crl.c | 4 ++-- ext/openssl/ossl_x509req.c | 2 +- ext/openssl/ossl_x509revoked.c | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) (limited to 'ext/openssl') diff --git a/ext/openssl/ossl_ocsp.c b/ext/openssl/ossl_ocsp.c index af32d99e01..00078e62df 100644 --- a/ext/openssl/ossl_ocsp.c +++ b/ext/openssl/ossl_ocsp.c @@ -671,9 +671,9 @@ ossl_ocspbres_add_status(VALUE self, VALUE cid, VALUE status, OCSP_BASICRESP *bs; OCSP_SINGLERESP *single; OCSP_CERTID *id; - int st, rsn; ASN1_TIME *ths, *nxt, *rev; - int error, i, rstatus = 0; + int st, rsn, error, rstatus = 0; + long i; VALUE tmp; st = NUM2INT(status); diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c index f1d5e61b1e..a57cc06c46 100644 --- a/ext/openssl/ossl_ssl.c +++ b/ext/openssl/ossl_ssl.c @@ -701,7 +701,8 @@ ossl_sslctx_setup(VALUE self) X509_STORE *store; EVP_PKEY *key = NULL; char *ca_path = NULL, *ca_file = NULL; - int i, verify_mode; + int verify_mode; + long i; VALUE val; if(OBJ_FROZEN(self)) return Qnil; diff --git a/ext/openssl/ossl_x509cert.c b/ext/openssl/ossl_x509cert.c index b1d57bf380..80a8f9527a 100644 --- a/ext/openssl/ossl_x509cert.c +++ b/ext/openssl/ossl_x509cert.c @@ -663,7 +663,7 @@ ossl_x509_set_extensions(VALUE self, VALUE ary) { X509 *x509; X509_EXTENSION *ext; - int i; + long i; Check_Type(ary, T_ARRAY); /* All ary's members should be X509Extension */ diff --git a/ext/openssl/ossl_x509crl.c b/ext/openssl/ossl_x509crl.c index 7293fce5a6..63c63aca24 100644 --- a/ext/openssl/ossl_x509crl.c +++ b/ext/openssl/ossl_x509crl.c @@ -302,7 +302,7 @@ ossl_x509crl_set_revoked(VALUE self, VALUE ary) { X509_CRL *crl; X509_REVOKED *rev; - int i; + long i; Check_Type(ary, T_ARRAY); /* All ary members should be X509 Revoked */ @@ -476,7 +476,7 @@ ossl_x509crl_set_extensions(VALUE self, VALUE ary) { X509_CRL *crl; X509_EXTENSION *ext; - int i; + long i; Check_Type(ary, T_ARRAY); /* All ary members should be X509 Extensions */ diff --git a/ext/openssl/ossl_x509req.c b/ext/openssl/ossl_x509req.c index 05d7ef9971..159c98efb0 100644 --- a/ext/openssl/ossl_x509req.c +++ b/ext/openssl/ossl_x509req.c @@ -418,7 +418,7 @@ ossl_x509req_set_attributes(VALUE self, VALUE ary) { X509_REQ *req; X509_ATTRIBUTE *attr; - int i; + long i; VALUE item; Check_Type(ary, T_ARRAY); diff --git a/ext/openssl/ossl_x509revoked.c b/ext/openssl/ossl_x509revoked.c index 0a949e7688..54c002ca06 100644 --- a/ext/openssl/ossl_x509revoked.c +++ b/ext/openssl/ossl_x509revoked.c @@ -188,7 +188,7 @@ ossl_x509revoked_set_extensions(VALUE self, VALUE ary) { X509_REVOKED *rev; X509_EXTENSION *ext; - int i; + long i; VALUE item; Check_Type(ary, T_ARRAY); -- cgit v1.2.3