Skip to content

Commit 7ab64d7

Browse files
store and store context: shareable when frozen
1 parent fcf170a commit 7ab64d7

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

ext/openssl/ossl.h

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

2227
#include <openssl/err.h>

ext/openssl/ossl_x509store.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ static const rb_data_type_t ossl_x509store_type = {
133133
{
134134
ossl_x509store_mark, ossl_x509store_free,
135135
},
136-
0, 0, RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED,
136+
0, 0, RUBY_TYPED_FREE_IMMEDIATELY | RUBY_TYPED_WB_PROTECTED | RUBY_TYPED_FROZEN_SHAREABLE,
137137
};
138138

139139
/*

0 commit comments

Comments
 (0)