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

ruby-changes:34986

From: suke <ko1@a...>
Date: Tue, 5 Aug 2014 19:31:17 +0900 (JST)
Subject: [ruby-changes:34986] suke:r47068 (trunk): * ext/win32ole/win32ole.c (ole_invoke): skip VariantClear when

suke	2014-08-05 19:31:00 +0900 (Tue, 05 Aug 2014)

  New Revision: 47068

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

  Log:
    * ext/win32ole/win32ole.c (ole_invoke): skip VariantClear when
      argument is VT_RECORD variant.

  Modified files:
    trunk/ChangeLog
    trunk/ext/win32ole/win32ole.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 47067)
+++ ChangeLog	(revision 47068)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Aug  5 19:27:59 2014  Masaki Suketa <masaki.suketa@n...>
+
+	* ext/win32ole/win32ole.c (ole_invoke): skip VariantClear when
+	  argument is VT_RECORD variant.
+
 Tue Aug  5 15:52:51 2014  SHIBATA Hiroshi  <shibata.hiroshi@g...>
 
 	* gems/bundled_gems: Upgrade to test-unit-3.0.0 and minitest-5.4.0.
Index: ext/win32ole/win32ole.c
===================================================================
--- ext/win32ole/win32ole.c	(revision 47067)
+++ ext/win32ole/win32ole.c	(revision 47068)
@@ -63,7 +63,7 @@ const IID IID_IMultiLanguage2 = {0xDCCFC https://github.com/ruby/ruby/blob/trunk/ext/win32ole/win32ole.c#L63
 
 #define WC2VSTR(x) ole_wc2vstr((x), TRUE)
 
-#define WIN32OLE_VERSION "1.7.2"
+#define WIN32OLE_VERSION "1.7.3"
 
 typedef HRESULT (STDAPICALLTYPE FNCOCREATEINSTANCEEX)
     (REFCLSID, IUnknown*, DWORD, COSERVERINFO*, DWORD, MULTI_QI*);
@@ -3586,7 +3586,9 @@ ole_invoke(int argc, VALUE *argv, VALUE https://github.com/ruby/ruby/blob/trunk/ext/win32ole/win32ole.c#L3586
                         &excepinfo, &argErr);
                 for(i = cNamedArgs; i < op.dp.cArgs; i++) {
                     n = op.dp.cArgs - i + cNamedArgs - 1;
-                    VariantClear(&op.dp.rgvarg[n]);
+                    if (V_VT(&op.dp.rgvarg[n]) != VT_RECORD) {
+                        VariantClear(&op.dp.rgvarg[n]);
+                    }
                 }
             }
         }

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

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