Skip to content

Commit 98099d3

Browse files
committed
Register global variables before assignment
1 parent a14055a commit 98099d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/openssl/ossl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,8 +1170,8 @@ Init_openssl(void)
11701170
/*
11711171
* Init main module
11721172
*/
1173-
mOSSL = rb_define_module("OpenSSL");
11741173
rb_global_variable(&mOSSL);
1174+
mOSSL = rb_define_module("OpenSSL");
11751175
rb_define_singleton_method(mOSSL, "fixed_length_secure_compare", ossl_crypto_fixed_length_secure_compare, 2);
11761176

11771177
/*
@@ -1208,12 +1208,12 @@ Init_openssl(void)
12081208
rb_define_module_function(mOSSL, "fips_mode", ossl_fips_mode_get, 0);
12091209
rb_define_module_function(mOSSL, "fips_mode=", ossl_fips_mode_set, 1);
12101210

1211+
rb_global_variable(&eOSSLError);
12111212
/*
12121213
* Generic error,
12131214
* common for all classes under OpenSSL module
12141215
*/
12151216
eOSSLError = rb_define_class_under(mOSSL,"OpenSSLError",rb_eStandardError);
1216-
rb_global_variable(&eOSSLError);
12171217

12181218
/*
12191219
* Init debug core

0 commit comments

Comments
 (0)