From 828de1a06d556d2f1f657f948f9d33a562957fba Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 28 May 2015 06:46:17 +0000 Subject: 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 --- ext/win32ole/win32ole.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ext/win32ole') 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); -- cgit v1.2.3