Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
5f8e6137
Commit
5f8e6137
authored
Jan 19, 2021
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 19, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Return DateInstance from create_date.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9521c6a1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
date.c
dlls/jscript/date.c
+8
-10
No files found.
dlls/jscript/date.c
View file @
5f8e6137
...
@@ -1918,7 +1918,7 @@ static const builtin_info_t DateInst_info = {
...
@@ -1918,7 +1918,7 @@ static const builtin_info_t DateInst_info = {
NULL
NULL
};
};
static
HRESULT
create_date
(
script_ctx_t
*
ctx
,
jsdisp_t
*
object_prototype
,
DOUBLE
time
,
jsdisp_t
**
ret
)
static
HRESULT
create_date
(
script_ctx_t
*
ctx
,
jsdisp_t
*
object_prototype
,
DOUBLE
time
,
DateInstance
**
ret
)
{
{
DateInstance
*
date
;
DateInstance
*
date
;
HRESULT
hres
;
HRESULT
hres
;
...
@@ -1946,7 +1946,7 @@ static HRESULT create_date(script_ctx_t *ctx, jsdisp_t *object_prototype, DOUBLE
...
@@ -1946,7 +1946,7 @@ static HRESULT create_date(script_ctx_t *ctx, jsdisp_t *object_prototype, DOUBLE
date
->
daylightDate
=
tzi
.
DaylightDate
;
date
->
daylightDate
=
tzi
.
DaylightDate
;
date
->
daylightBias
=
tzi
.
DaylightBias
;
date
->
daylightBias
=
tzi
.
DaylightBias
;
*
ret
=
&
date
->
dispex
;
*
ret
=
date
;
return
S_OK
;
return
S_OK
;
}
}
...
@@ -2354,7 +2354,7 @@ static HRESULT DateConstr_now(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, un
...
@@ -2354,7 +2354,7 @@ static HRESULT DateConstr_now(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, un
static
HRESULT
DateConstr_value
(
script_ctx_t
*
ctx
,
vdisp_t
*
jsthis
,
WORD
flags
,
unsigned
argc
,
jsval_t
*
argv
,
static
HRESULT
DateConstr_value
(
script_ctx_t
*
ctx
,
vdisp_t
*
jsthis
,
WORD
flags
,
unsigned
argc
,
jsval_t
*
argv
,
jsval_t
*
r
)
jsval_t
*
r
)
{
{
jsdisp_t
*
date
;
DateInstance
*
date
;
HRESULT
hres
;
HRESULT
hres
;
TRACE
(
"
\n
"
);
TRACE
(
"
\n
"
);
...
@@ -2396,7 +2396,6 @@ static HRESULT DateConstr_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags,
...
@@ -2396,7 +2396,6 @@ static HRESULT DateConstr_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags,
/* ECMA-262 3rd Edition 15.9.3.1 */
/* ECMA-262 3rd Edition 15.9.3.1 */
default:
{
default:
{
double
ret_date
;
double
ret_date
;
DateInstance
*
di
;
hres
=
date_utc
(
ctx
,
argc
,
argv
,
&
ret_date
);
hres
=
date_utc
(
ctx
,
argc
,
argv
,
&
ret_date
);
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
...
@@ -2406,12 +2405,11 @@ static HRESULT DateConstr_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags,
...
@@ -2406,12 +2405,11 @@ static HRESULT DateConstr_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags,
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
hres
;
return
hres
;
di
=
date_from_jsdisp
(
date
);
date
->
time
=
utc
(
date
->
time
,
date
);
di
->
time
=
utc
(
di
->
time
,
di
);
}
}
}
}
*
r
=
jsval_obj
(
date
);
*
r
=
jsval_obj
(
&
date
->
dispex
);
return
S_OK
;
return
S_OK
;
case
INVOKE_FUNC
:
{
case
INVOKE_FUNC
:
{
...
@@ -2451,7 +2449,7 @@ static const builtin_info_t DateConstr_info = {
...
@@ -2451,7 +2449,7 @@ static const builtin_info_t DateConstr_info = {
HRESULT
create_date_constr
(
script_ctx_t
*
ctx
,
jsdisp_t
*
object_prototype
,
jsdisp_t
**
ret
)
HRESULT
create_date_constr
(
script_ctx_t
*
ctx
,
jsdisp_t
*
object_prototype
,
jsdisp_t
**
ret
)
{
{
jsdisp_t
*
date
;
DateInstance
*
date
;
HRESULT
hres
;
HRESULT
hres
;
hres
=
create_date
(
ctx
,
object_prototype
,
0
.
0
,
&
date
);
hres
=
create_date
(
ctx
,
object_prototype
,
0
.
0
,
&
date
);
...
@@ -2459,8 +2457,8 @@ HRESULT create_date_constr(script_ctx_t *ctx, jsdisp_t *object_prototype, jsdisp
...
@@ -2459,8 +2457,8 @@ HRESULT create_date_constr(script_ctx_t *ctx, jsdisp_t *object_prototype, jsdisp
return
hres
;
return
hres
;
hres
=
create_builtin_constructor
(
ctx
,
DateConstr_value
,
L"Date"
,
&
DateConstr_info
,
hres
=
create_builtin_constructor
(
ctx
,
DateConstr_value
,
L"Date"
,
&
DateConstr_info
,
PROPF_CONSTR
|
7
,
date
,
ret
);
PROPF_CONSTR
|
7
,
&
date
->
dispex
,
ret
);
jsdisp_release
(
date
);
jsdisp_release
(
&
date
->
dispex
);
return
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