aboutsummaryrefslogtreecommitdiffstats
path: root/ext/win32ole
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-28 06:46:17 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-28 06:46:17 +0000
commit828de1a06d556d2f1f657f948f9d33a562957fba (patch)
treec87e4da8125843144f0fb4841b637654cddf5ac2 /ext/win32ole
parentfbc67dbf2c73954607e22dc9079ddfc0b2a3c233 (diff)
downloadruby-828de1a06d556d2f1f657f948f9d33a562957fba.tar.gz
win32ole.c: wrapper object before alloc
* ext/win32ole/win32ole.c (Init_win32ole): make wrapper object before making st_table. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/win32ole')
-rw-r--r--ext/win32ole/win32ole.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c
index 2ce8b5a226..56e625642e 100644
--- a/ext/win32ole/win32ole.c
+++ b/ext/win32ole/win32ole.c
@@ -3909,10 +3909,12 @@ Init_win32ole(void)
message_filter.RetryRejectedCall = mf_RetryRejectedCall;
message_filter.MessagePending = mf_MessagePending;
- enc2cp_hash = TypedData_Wrap_Struct(rb_cData, &win32ole_hash_datatype, st_init_numtable());
+ enc2cp_hash = TypedData_Wrap_Struct(rb_cData, &win32ole_hash_datatype, 0);
+ RTYPEDDATA_DATA(enc2cp_hash) = st_init_numtable();
rb_gc_register_mark_object(enc2cp_hash);
- com_hash = TypedData_Wrap_Struct(rb_cData, &win32ole_hash_datatype, st_init_numtable());
+ com_hash = TypedData_Wrap_Struct(rb_cData, &win32ole_hash_datatype, 0);
+ RTYPEDDATA_DATA(com_hash) = st_init_numtable();
rb_gc_register_mark_object(com_hash);
cWIN32OLE = rb_define_class("WIN32OLE", rb_cObject);