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

ruby-changes:43816

From: nobu <ko1@a...>
Date: Sat, 13 Aug 2016 22:01:18 +0900 (JST)
Subject: [ruby-changes:43816] nobu:r55889 (trunk): win32ole.c: fix long conversion

nobu	2016-08-13 22:01:13 +0900 (Sat, 13 Aug 2016)

  New Revision: 55889

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

  Log:
    win32ole.c: fix long conversion
    
    * ext/win32ole/win32ole.c (ole_val2variant): reuse the converted
      result for V_I8.

  Modified files:
    trunk/ext/win32ole/win32ole.c
Index: ext/win32ole/win32ole.c
===================================================================
--- ext/win32ole/win32ole.c	(revision 55888)
+++ ext/win32ole/win32ole.c	(revision 55889)
@@ -1275,7 +1275,7 @@ ole_val2variant(VALUE val, VARIANT *var) https://github.com/ruby/ruby/blob/trunk/ext/win32ole/win32ole.c#L1275
             V_I4(var) = (LONG)v;
 #if SIZEOF_LONG > 4
             if (V_I4(var) != v) {
-                V_I8(var) = NUM2LONG(val);
+                V_I8(var) = v;
                 V_VT(var) = VT_I8;
             }
 #endif

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

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