From 57e2877e7b8257665f07f63aa37ed09f8fe78310 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 5 Nov 2015 01:09:17 +0000 Subject: ext: use RARRAY_AREF * ext/**/*.c: prefer RARRAY_AREF to indexing RARRAY_CONST_PTR. pointed out by hanmac. https://github.com/ruby/ruby/commit/3553a86#commitcomment-14187670 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/openssl/ossl_ocsp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/openssl/ossl_ocsp.c') diff --git a/ext/openssl/ossl_ocsp.c b/ext/openssl/ossl_ocsp.c index 197fcc9d47..02b67429e6 100644 --- a/ext/openssl/ossl_ocsp.c +++ b/ext/openssl/ossl_ocsp.c @@ -682,7 +682,7 @@ ossl_ocspbres_add_status(VALUE self, VALUE cid, VALUE status, /* All ary's members should be X509Extension */ Check_Type(ext, T_ARRAY); for (i = 0; i < RARRAY_LEN(ext); i++) - OSSL_Check_Kind(RARRAY_CONST_PTR(ext)[i], cX509Ext); + OSSL_Check_Kind(RARRAY_AREF(ext, i), cX509Ext); } error = 0; @@ -711,7 +711,7 @@ ossl_ocspbres_add_status(VALUE self, VALUE cid, VALUE status, sk_X509_EXTENSION_pop_free(single->singleExtensions, X509_EXTENSION_free); single->singleExtensions = NULL; for(i = 0; i < RARRAY_LEN(ext); i++){ - x509ext = DupX509ExtPtr(RARRAY_CONST_PTR(ext)[i]); + x509ext = DupX509ExtPtr(RARRAY_AREF(ext, i)); if(!OCSP_SINGLERESP_add_ext(single, x509ext, -1)){ X509_EXTENSION_free(x509ext); error = 1; -- cgit v1.2.3