summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ext/win32ole/win32ole.c12
2 files changed, 14 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 113a5b39f18..8431ecfb4bc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sat Aug 13 07:51:40 2016 Masaki Suketa <masaki.suketa@nifty.ne.jp>
+
+ * ext/win32ole/win32ole.c (ole_val2variant): fix integer conversion in
+ cygwin64.
+
Fri Aug 12 21:05:19 2016 NARUSE, Yui <naruse@ruby-lang.org>
* lib/webrick/config.rb (WEBrick::Config::General):
diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c
index 229780d565c..dbed05f8e55 100644
--- a/ext/win32ole/win32ole.c
+++ b/ext/win32ole/win32ole.c
@@ -26,7 +26,7 @@
const IID IID_IMultiLanguage2 = {0xDCCFC164, 0x2B38, 0x11d2, {0xB7, 0xEC, 0x00, 0xC0, 0x4F, 0x8F, 0x5D, 0x9A}};
#endif
-#define WIN32OLE_VERSION "1.8.4"
+#define WIN32OLE_VERSION "1.8.5"
typedef HRESULT (STDAPICALLTYPE FNCOCREATEINSTANCEEX)
(REFCLSID, IUnknown*, DWORD, COSERVERINFO*, DWORD, MULTI_QI*);
@@ -1269,8 +1269,14 @@ ole_val2variant(VALUE val, VARIANT *var)
V_BSTR(var) = ole_vstr2wc(val);
break;
case T_FIXNUM:
- V_VT(var) = VT_I4;
- V_I4(var) = NUM2INT(val);
+ V_I4(var) = NUM2LONG(val);
+ if (V_I4(var) == NUM2LONG(val)) {
+ V_VT(var) = VT_I4;
+ }
+ else {
+ V_I8(var) = NUM2LONG(val);
+ V_VT(var) = VT_I8;
+ }
break;
case T_BIGNUM:
V_VT(var) = VT_R8;