mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/win32ole/win32ole.c (d2time): fix the bug of VT_DATE
to String conversion when negative value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@17879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f1887dc00d
commit
c2c09b3401
2 changed files with 8 additions and 2 deletions
|
|
@ -1,3 +1,8 @@
|
|||
Sat Jul 5 00:31:53 2008 Masaki Suketa <masaki.suketa@nifty.ne.jp>
|
||||
|
||||
* 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@ruby-lang.org>
|
||||
|
||||
* eval.c (rb_thread_join): new API.
|
||||
|
|
|
|||
|
|
@ -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 @@ d2time(v, hh, mm, ss)
|
|||
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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue