Skip to content

Commit b8504c2

Browse files
move ractor safe macro to ossl.h
in order to import or define the RUBY_TYPED_FROZEN_SHAREABLE macro.
1 parent 8367b16 commit b8504c2

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

ext/openssl/ossl.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@
1717
#include <errno.h>
1818
#include <ruby/io.h>
1919
#include <ruby/thread.h>
20+
#ifdef HAVE_RUBY_RACTOR_H
21+
#include <ruby/ractor.h>
22+
#else
23+
#define RUBY_TYPED_FROZEN_SHAREABLE 0
24+
#endif
25+
2026
#include <openssl/opensslv.h>
2127

2228
#include <openssl/err.h>

ext/openssl/ossl_bn.c

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

13-
#ifdef HAVE_RB_EXT_RACTOR_SAFE
14-
#include <ruby/ractor.h>
15-
#endif
16-
1713
#define NewBN(klass) \
1814
TypedData_Wrap_Struct((klass), &ossl_bn_type, 0)
1915
#define SetBN(obj, bn) do { \

0 commit comments

Comments
 (0)