ruby-changes:6364
From: suke <ko1@a...>
Date: Sat, 5 Jul 2008 00:37:40 +0900 (JST)
Subject: [ruby-changes:6364] Ruby:r17879 (ruby_1_8): * ext/win32ole/win32ole.c (d2time): fix the bug of VT_DATE
suke 2008-07-05 00:37:22 +0900 (Sat, 05 Jul 2008)
New Revision: 17879
Modified files:
branches/ruby_1_8/ChangeLog
branches/ruby_1_8/ext/win32ole/win32ole.c
Log:
* ext/win32ole/win32ole.c (d2time): fix the bug of VT_DATE
to String conversion when negative value.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=17879
Index: ruby_1_8/ext/win32ole/win32ole.c
===================================================================
--- ruby_1_8/ext/win32ole/win32ole.c (revision 17878)
+++ ruby_1_8/ext/win32ole/win32ole.c (revision 17879)
@@ -22,6 +22,7 @@
#include <ocidl.h>
#include <olectl.h>
#include <ole2.h>
+#include <math.h>
#ifdef HAVE_STDARG_PROTOTYPES
#include <stdarg.h>
#define va_init_list(a,b) va_start(a,b)
@@ -79,7 +80,7 @@
#define WC2VSTR(x) ole_wc2vstr((x), TRUE)
-#define WIN32OLE_VERSION "0.7.6"
+#define WIN32OLE_VERSION "0.7.7"
typedef HRESULT (STDAPICALLTYPE FNCOCREATEINSTANCEEX)
(REFCLSID, IUnknown*, DWORD, COSERVERINFO*, DWORD, MULTI_QI*);
@@ -445,7 +446,7 @@
double d_hh, d_mm, d_ss;
int i_hh, i_mm, i_ss;
- double d = v * 86400.0;
+ double d = fabs(v * 86400.0);
d_hh = d / 3600.0;
i_hh = (int)d_hh;
Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog (revision 17878)
+++ ruby_1_8/ChangeLog (revision 17879)
@@ -1,3 +1,8 @@
+Sat Jul 5 00:31:53 2008 Masaki Suketa <masaki.suketa@n...>
+
+ * ext/win32ole/win32ole.c (d2time): fix the bug of VT_DATE
+ to String conversion when negative value.
+
Fri Jul 4 20:31:33 2008 Nobuyoshi Nakada <nobu@r...>
* eval.c (rb_thread_join): new API.
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/