[前][次][番号順一覧][スレッド一覧]

ruby-changes:38578

From: nobu <ko1@a...>
Date: Thu, 28 May 2015 15:46:23 +0900 (JST)
Subject: [ruby-changes:38578] nobu:r50659 (trunk): win32ole.c: wrapper object before alloc

nobu	2015-05-28 15:46:17 +0900 (Thu, 28 May 2015)

  New Revision: 50659

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50659

  Log:
    win32ole.c: wrapper object before alloc
    
    * ext/win32ole/win32ole.c (Init_win32ole): make wrapper object
      before making st_table.

  Modified files:
    trunk/ext/win32ole/win32ole.c
Index: ext/win32ole/win32ole.c
===================================================================
--- ext/win32ole/win32ole.c	(revision 50658)
+++ ext/win32ole/win32ole.c	(revision 50659)
@@ -3909,10 +3909,12 @@ Init_win32ole(void) https://github.com/ruby/ruby/blob/trunk/ext/win32ole/win32ole.c#L3909
     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);

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]