diff options
author | Tom Stuart <tom.stuart@shopify.com> | 2021-03-25 17:42:59 +0000 |
---|---|---|
committer | Tom Stuart <tom.stuart@shopify.com> | 2021-03-25 17:43:04 +0000 |
commit | e4a622e67eacc831a50a1715277c1533fd6ade81 (patch) | |
tree | d41221ebce77824b15f1b4f36da595a54c9536f2 /ext/openssl | |
parent | 65e2adf1ac9909147b36a89cb9c858fe3a62ca9a (diff) | |
download | ruby-openssl-e4a622e67eacc831a50a1715277c1533fd6ade81.tar.gz |
Use #ifdef consistently for HAVE_RB_EXT_RACTOR_SAFE
We previously used a mix of both `#if` and `#ifdef`, but the latter is
more reliable because it will still work if the macro is undefined.
Diffstat (limited to 'ext/openssl')
-rw-r--r-- | ext/openssl/ossl.c | 2 | ||||
-rw-r--r-- | ext/openssl/ossl_bn.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c index 7bdf3a2e..70b6a6a8 100644 --- a/ext/openssl/ossl.c +++ b/ext/openssl/ossl.c @@ -1129,7 +1129,7 @@ ossl_crypto_fixed_length_secure_compare(VALUE dummy, VALUE str1, VALUE str2) void Init_openssl(void) { -#if HAVE_RB_EXT_RACTOR_SAFE +#ifdef HAVE_RB_EXT_RACTOR_SAFE rb_ext_ractor_safe(true); #endif diff --git a/ext/openssl/ossl_bn.c b/ext/openssl/ossl_bn.c index bec37299..1d43e457 100644 --- a/ext/openssl/ossl_bn.c +++ b/ext/openssl/ossl_bn.c @@ -10,7 +10,7 @@ /* modified by Michal Rokos <m.rokos@sh.cvut.cz> */ #include "ossl.h" -#if HAVE_RB_EXT_RACTOR_SAFE +#ifdef HAVE_RB_EXT_RACTOR_SAFE #include <ruby/ractor.h> #endif @@ -155,7 +155,7 @@ ossl_bn_value_ptr(volatile VALUE *ptr) * Private */ -#if HAVE_RB_EXT_RACTOR_SAFE +#ifdef HAVE_RB_EXT_RACTOR_SAFE void ossl_bn_ctx_free(void *ptr) { |