Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
0d287ff0
Commit
0d287ff0
authored
Mar 27, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 27, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Return double instead of VARIANT from date_utc.
parent
451169fb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
date.c
dlls/jscript/date.c
+12
-11
No files found.
dlls/jscript/date.c
View file @
0d287ff0
...
...
@@ -2431,7 +2431,7 @@ static HRESULT DateConstr_parse(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags,
return
S_OK
;
}
static
HRESULT
date_utc
(
script_ctx_t
*
ctx
,
DISPPARAMS
*
dp
,
VARIANT
*
retv
,
jsexcept_t
*
ei
)
static
HRESULT
date_utc
(
script_ctx_t
*
ctx
,
DISPPARAMS
*
dp
,
double
*
ret
,
jsexcept_t
*
ei
)
{
double
year
,
month
,
vdate
,
hours
,
minutes
,
seconds
,
ms
;
int
arg_no
=
arg_cnt
(
dp
);
...
...
@@ -2497,22 +2497,23 @@ static HRESULT date_utc(script_ctx_t *ctx, DISPPARAMS *dp, VARIANT *retv, jsexce
ms
=
0
;
}
if
(
retv
)
{
V_VT
(
retv
)
=
VT_R8
;
V_R8
(
retv
)
=
time_clip
(
make_date
(
make_day
(
year
,
month
,
vdate
),
make_time
(
hours
,
minutes
,
seconds
,
ms
)));
}
*
ret
=
time_clip
(
make_date
(
make_day
(
year
,
month
,
vdate
),
make_time
(
hours
,
minutes
,
seconds
,
ms
)));
return
S_OK
;
}
static
HRESULT
DateConstr_UTC
(
script_ctx_t
*
ctx
,
vdisp_t
*
jsthis
,
WORD
flags
,
DISPPARAMS
*
dp
,
VARIANT
*
retv
,
jsexcept_t
*
ei
)
{
double
n
;
HRESULT
hres
;
TRACE
(
"
\n
"
);
return
date_utc
(
ctx
,
dp
,
retv
,
ei
);
hres
=
date_utc
(
ctx
,
dp
,
&
n
,
ei
);
if
(
SUCCEEDED
(
hres
)
&&
retv
)
num_set_val
(
retv
,
n
);
return
hres
;
}
static
HRESULT
DateConstr_value
(
script_ctx_t
*
ctx
,
vdisp_t
*
jsthis
,
WORD
flags
,
DISPPARAMS
*
dp
,
...
...
@@ -2567,14 +2568,14 @@ static HRESULT DateConstr_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags,
/* ECMA-262 3rd Edition 15.9.3.1 */
default:
{
VARIANT
ret_date
;
double
ret_date
;
DateInstance
*
di
;
hres
=
date_utc
(
ctx
,
dp
,
&
ret_date
,
ei
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
create_date
(
ctx
,
NULL
,
num_val
(
&
ret_date
)
,
&
date
);
hres
=
create_date
(
ctx
,
NULL
,
ret_date
,
&
date
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment