Skip to content

Commit e4a622e

Browse files
committed
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.
1 parent 65e2adf commit e4a622e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ext/openssl/ossl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1129,7 +1129,7 @@ ossl_crypto_fixed_length_secure_compare(VALUE dummy, VALUE str1, VALUE str2)
11291129
void
11301130
Init_openssl(void)
11311131
{
1132-
#if HAVE_RB_EXT_RACTOR_SAFE
1132+
#ifdef HAVE_RB_EXT_RACTOR_SAFE
11331133
rb_ext_ractor_safe(true);
11341134
#endif
11351135

ext/openssl/ossl_bn.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/* modified by Michal Rokos <m.rokos@sh.cvut.cz> */
1111
#include "ossl.h"
1212

13-
#if HAVE_RB_EXT_RACTOR_SAFE
13+
#ifdef HAVE_RB_EXT_RACTOR_SAFE
1414
#include <ruby/ractor.h>
1515
#endif
1616

@@ -155,7 +155,7 @@ ossl_bn_value_ptr(volatile VALUE *ptr)
155155
* Private
156156
*/
157157

158-
#if HAVE_RB_EXT_RACTOR_SAFE
158+
#ifdef HAVE_RB_EXT_RACTOR_SAFE
159159
void
160160
ossl_bn_ctx_free(void *ptr)
161161
{

0 commit comments

Comments
 (0)