ruby-changes:51474
From: nobu <ko1@a...>
Date: Sun, 17 Jun 2018 19:17:45 +0900 (JST)
Subject: [ruby-changes:51474] nobu:r63684 (trunk): openssl_missing.h: constified
nobu 2018-06-17 19:17:39 +0900 (Sun, 17 Jun 2018) New Revision: 63684 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63684 Log: openssl_missing.h: constified * ext/openssl/openssl_missing.h (IMPL_KEY_ACCESSOR{2,3}): constified obj argument getters. Modified files: trunk/ext/openssl/openssl_missing.h Index: ext/openssl/openssl_missing.h =================================================================== --- ext/openssl/openssl_missing.h (revision 63683) +++ ext/openssl/openssl_missing.h (revision 63684) @@ -152,7 +152,7 @@ void ossl_X509_REQ_get0_signature(const https://github.com/ruby/ruby/blob/trunk/ext/openssl/openssl_missing.h#L152 static inline _type *EVP_PKEY_get0_##_type(EVP_PKEY *pkey) { \ return pkey->pkey._name; } #define IMPL_KEY_ACCESSOR2(_type, _group, a1, a2, _fail_cond) \ -static inline void _type##_get0_##_group(_type *obj, const BIGNUM **a1, const BIGNUM **a2) { \ +static inline void _type##_get0_##_group(const _type *obj, const BIGNUM **a1, const BIGNUM **a2) { \ if (a1) *a1 = obj->a1; \ if (a2) *a2 = obj->a2; } \ static inline int _type##_set0_##_group(_type *obj, BIGNUM *a1, BIGNUM *a2) { \ @@ -161,7 +161,7 @@ static inline int _type##_set0_##_group( https://github.com/ruby/ruby/blob/trunk/ext/openssl/openssl_missing.h#L161 BN_clear_free(obj->a2); obj->a2 = a2; \ return 1; } #define IMPL_KEY_ACCESSOR3(_type, _group, a1, a2, a3, _fail_cond) \ -static inline void _type##_get0_##_group(_type *obj, const BIGNUM **a1, const BIGNUM **a2, const BIGNUM **a3) { \ +static inline void _type##_get0_##_group(const _type *obj, const BIGNUM **a1, const BIGNUM **a2, const BIGNUM **a3) { \ if (a1) *a1 = obj->a1; \ if (a2) *a2 = obj->a2; \ if (a3) *a3 = obj->a3; } \ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/