diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-05-28 06:46:17 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-05-28 06:46:17 +0000 |
commit | 52c0280a74fc06b2e596556d7f957afd80648fa2 (patch) | |
tree | c87e4da8125843144f0fb4841b637654cddf5ac2 /ext/win32ole/win32ole.c | |
parent | 9eb17e6ae59a3151800d5ad61e5b75ce16a1ba80 (diff) | |
download | ruby-52c0280a74fc06b2e596556d7f957afd80648fa2.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/win32ole.c')
-rw-r--r-- | ext/win32ole/win32ole.c | 6 |
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); |