Commit d3a1a3de authored by Kubo Takehiro's avatar Kubo Takehiro
Browse files

Fix load errors when GC.stress = true.

parent 48aa526f
2016-09-25 Kubo Takehiro <kubo@jiubao.org>
* ext/oci8/metadata.c, ext/oci8/oci8.c: Fix load error when
GC.stress = true.
2016-09-11 Kubo Takehiro <kubo@jiubao.org>
* ext/oci8/oci8.h: Suppress 'warning: "ALWAYS_INLINE" redefined' when
compiled for ruby 2.4.0-preview2.
......
......@@ -259,10 +259,10 @@ void Init_oci8_metadata(VALUE cOCI8)
{
mOCI8Metadata = rb_define_module_under(cOCI8, "Metadata");
cOCI8MetadataBase = oci8_define_class_under(mOCI8Metadata, "Base", &oci8_metadata_base_data_type, oci8_metadata_alloc);
ptype_to_class = rb_hash_new();
class_to_ptype = rb_hash_new();
rb_global_variable(&ptype_to_class);
rb_global_variable(&class_to_ptype);
ptype_to_class = rb_hash_new();
class_to_ptype = rb_hash_new();
id_at_obj_link = rb_intern("@obj_link");
rb_define_singleton_method(cOCI8MetadataBase, "register_ptype", metadata_s_register_ptype, 1);
......
......@@ -372,8 +372,8 @@ void oci8_do_parse_connect_string(VALUE conn_str, VALUE *user, VALUE *pass, VALU
{
static VALUE re = Qnil;
if (NIL_P(re)) {
re = rb_eval_string(CONN_STR_REGEX);
rb_global_variable(&re);
re = rb_eval_string(CONN_STR_REGEX);
}
OCI8SafeStringValue(conn_str);
if (RTEST(rb_reg_match(re, conn_str))) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment