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
41e297af
Commit
41e297af
authored
Jul 03, 2009
by
Piotr Caban
Committed by
Alexandre Julliard
Jul 03, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added stub implementation of Date constructor properties.
parent
dd5a9a0a
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
54 additions
and
17 deletions
+54
-17
array.c
dlls/jscript/array.c
+1
-1
bool.c
dlls/jscript/bool.c
+1
-1
date.c
dlls/jscript/date.c
+32
-1
dispex.c
dlls/jscript/dispex.c
+1
-1
function.c
dlls/jscript/function.c
+11
-8
jscript.h
dlls/jscript/jscript.h
+4
-1
number.c
dlls/jscript/number.c
+1
-1
object.c
dlls/jscript/object.c
+1
-1
regexp.c
dlls/jscript/regexp.c
+1
-1
string.c
dlls/jscript/string.c
+1
-1
No files found.
dlls/jscript/array.c
View file @
41e297af
...
@@ -829,7 +829,7 @@ HRESULT create_array_constr(script_ctx_t *ctx, DispatchEx **ret)
...
@@ -829,7 +829,7 @@ HRESULT create_array_constr(script_ctx_t *ctx, DispatchEx **ret)
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
hres
;
return
hres
;
hres
=
create_builtin_function
(
ctx
,
ArrayConstr_value
,
PROPF_CONSTR
,
&
array
->
dispex
,
ret
);
hres
=
create_builtin_function
(
ctx
,
ArrayConstr_value
,
NULL
,
PROPF_CONSTR
,
&
array
->
dispex
,
ret
);
IDispatchEx_Release
(
_IDispatchEx_
(
&
array
->
dispex
));
IDispatchEx_Release
(
_IDispatchEx_
(
&
array
->
dispex
));
return
hres
;
return
hres
;
...
...
dlls/jscript/bool.c
View file @
41e297af
...
@@ -142,7 +142,7 @@ HRESULT create_bool_constr(script_ctx_t *ctx, DispatchEx **ret)
...
@@ -142,7 +142,7 @@ HRESULT create_bool_constr(script_ctx_t *ctx, DispatchEx **ret)
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
hres
;
return
hres
;
hres
=
create_builtin_function
(
ctx
,
BoolConstr_value
,
PROPF_CONSTR
,
&
bool
->
dispex
,
ret
);
hres
=
create_builtin_function
(
ctx
,
BoolConstr_value
,
NULL
,
PROPF_CONSTR
,
&
bool
->
dispex
,
ret
);
jsdisp_release
(
&
bool
->
dispex
);
jsdisp_release
(
&
bool
->
dispex
);
return
hres
;
return
hres
;
...
...
dlls/jscript/date.c
View file @
41e297af
...
@@ -87,6 +87,9 @@ static const WCHAR setUTCMonthW[] = {'s','e','t','U','T','C','M','o','n','t','h'
...
@@ -87,6 +87,9 @@ static const WCHAR setUTCMonthW[] = {'s','e','t','U','T','C','M','o','n','t','h'
static
const
WCHAR
setFullYearW
[]
=
{
's'
,
'e'
,
't'
,
'F'
,
'u'
,
'l'
,
'l'
,
'Y'
,
'e'
,
'a'
,
'r'
,
0
};
static
const
WCHAR
setFullYearW
[]
=
{
's'
,
'e'
,
't'
,
'F'
,
'u'
,
'l'
,
'l'
,
'Y'
,
'e'
,
'a'
,
'r'
,
0
};
static
const
WCHAR
setUTCFullYearW
[]
=
{
's'
,
'e'
,
't'
,
'U'
,
'T'
,
'C'
,
'F'
,
'u'
,
'l'
,
'l'
,
'Y'
,
'e'
,
'a'
,
'r'
,
0
};
static
const
WCHAR
setUTCFullYearW
[]
=
{
's'
,
'e'
,
't'
,
'U'
,
'T'
,
'C'
,
'F'
,
'u'
,
'l'
,
'l'
,
'Y'
,
'e'
,
'a'
,
'r'
,
0
};
static
const
WCHAR
UTCW
[]
=
{
'U'
,
'T'
,
'C'
,
0
};
static
const
WCHAR
parseW
[]
=
{
'p'
,
'a'
,
'r'
,
's'
,
'e'
,
0
};
/*ECMA-262 3rd Edition 15.9.1.2 */
/*ECMA-262 3rd Edition 15.9.1.2 */
#define MS_PER_DAY 86400000
#define MS_PER_DAY 86400000
#define MS_PER_HOUR 3600000
#define MS_PER_HOUR 3600000
...
@@ -2197,6 +2200,20 @@ static HRESULT create_date(script_ctx_t *ctx, BOOL use_constr, DOUBLE time, Disp
...
@@ -2197,6 +2200,20 @@ static HRESULT create_date(script_ctx_t *ctx, BOOL use_constr, DOUBLE time, Disp
return
S_OK
;
return
S_OK
;
}
}
static
HRESULT
DateConstr_parse
(
DispatchEx
*
dispex
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
dp
,
VARIANT
*
retv
,
jsexcept_t
*
ei
,
IServiceProvider
*
sp
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
DateConstr_UTC
(
DispatchEx
*
dispex
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
dp
,
VARIANT
*
retv
,
jsexcept_t
*
ei
,
IServiceProvider
*
sp
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
DateConstr_value
(
DispatchEx
*
dispex
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
dp
,
static
HRESULT
DateConstr_value
(
DispatchEx
*
dispex
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
dp
,
VARIANT
*
retv
,
jsexcept_t
*
ei
,
IServiceProvider
*
sp
)
VARIANT
*
retv
,
jsexcept_t
*
ei
,
IServiceProvider
*
sp
)
{
{
...
@@ -2339,6 +2356,20 @@ static HRESULT DateConstr_value(DispatchEx *dispex, LCID lcid, WORD flags, DISPP
...
@@ -2339,6 +2356,20 @@ static HRESULT DateConstr_value(DispatchEx *dispex, LCID lcid, WORD flags, DISPP
return
S_OK
;
return
S_OK
;
}
}
static
const
builtin_prop_t
DateConstr_props
[]
=
{
{
UTCW
,
DateConstr_UTC
,
PROPF_METHOD
},
{
parseW
,
DateConstr_parse
,
PROPF_METHOD
}
};
static
const
builtin_info_t
DateConstr_info
=
{
JSCLASS_FUNCTION
,
{
NULL
,
Function_value
,
0
},
sizeof
(
DateConstr_props
)
/
sizeof
(
*
DateConstr_props
),
DateConstr_props
,
NULL
,
NULL
};
HRESULT
create_date_constr
(
script_ctx_t
*
ctx
,
DispatchEx
**
ret
)
HRESULT
create_date_constr
(
script_ctx_t
*
ctx
,
DispatchEx
**
ret
)
{
{
DispatchEx
*
date
;
DispatchEx
*
date
;
...
@@ -2348,7 +2379,7 @@ HRESULT create_date_constr(script_ctx_t *ctx, DispatchEx **ret)
...
@@ -2348,7 +2379,7 @@ HRESULT create_date_constr(script_ctx_t *ctx, DispatchEx **ret)
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
hres
;
return
hres
;
hres
=
create_builtin_function
(
ctx
,
DateConstr_value
,
PROPF_CONSTR
,
date
,
ret
);
hres
=
create_builtin_function
(
ctx
,
DateConstr_value
,
&
DateConstr_info
,
PROPF_CONSTR
,
date
,
ret
);
jsdisp_release
(
date
);
jsdisp_release
(
date
);
return
hres
;
return
hres
;
...
...
dlls/jscript/dispex.c
View file @
41e297af
...
@@ -293,7 +293,7 @@ static HRESULT prop_get(DispatchEx *This, dispex_prop_t *prop, LCID lcid, DISPPA
...
@@ -293,7 +293,7 @@ static HRESULT prop_get(DispatchEx *This, dispex_prop_t *prop, LCID lcid, DISPPA
case
PROP_BUILTIN
:
case
PROP_BUILTIN
:
if
(
prop
->
u
.
p
->
flags
&
PROPF_METHOD
)
{
if
(
prop
->
u
.
p
->
flags
&
PROPF_METHOD
)
{
DispatchEx
*
obj
;
DispatchEx
*
obj
;
hres
=
create_builtin_function
(
This
->
ctx
,
prop
->
u
.
p
->
invoke
,
prop
->
u
.
p
->
flags
,
NULL
,
&
obj
);
hres
=
create_builtin_function
(
This
->
ctx
,
prop
->
u
.
p
->
invoke
,
NULL
,
prop
->
u
.
p
->
flags
,
NULL
,
&
obj
);
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
break
;
break
;
...
...
dlls/jscript/function.c
View file @
41e297af
...
@@ -341,7 +341,7 @@ static HRESULT Function_isPrototypeOf(DispatchEx *dispex, LCID lcid, WORD flags,
...
@@ -341,7 +341,7 @@ static HRESULT Function_isPrototypeOf(DispatchEx *dispex, LCID lcid, WORD flags,
return
E_NOTIMPL
;
return
E_NOTIMPL
;
}
}
static
HRESULT
Function_value
(
DispatchEx
*
dispex
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
dp
,
HRESULT
Function_value
(
DispatchEx
*
dispex
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
dp
,
VARIANT
*
retv
,
jsexcept_t
*
ei
,
IServiceProvider
*
caller
)
VARIANT
*
retv
,
jsexcept_t
*
ei
,
IServiceProvider
*
caller
)
{
{
FunctionInstance
*
function
;
FunctionInstance
*
function
;
...
@@ -435,7 +435,8 @@ static HRESULT FunctionProt_value(DispatchEx *dispex, LCID lcid, WORD flags, DIS
...
@@ -435,7 +435,8 @@ static HRESULT FunctionProt_value(DispatchEx *dispex, LCID lcid, WORD flags, DIS
return
E_NOTIMPL
;
return
E_NOTIMPL
;
}
}
static
HRESULT
create_function
(
script_ctx_t
*
ctx
,
DWORD
flags
,
BOOL
funcprot
,
DispatchEx
*
prototype
,
FunctionInstance
**
ret
)
static
HRESULT
create_function
(
script_ctx_t
*
ctx
,
const
builtin_info_t
*
builtin_info
,
DWORD
flags
,
BOOL
funcprot
,
DispatchEx
*
prototype
,
FunctionInstance
**
ret
)
{
{
FunctionInstance
*
function
;
FunctionInstance
*
function
;
HRESULT
hres
;
HRESULT
hres
;
...
@@ -446,6 +447,8 @@ static HRESULT create_function(script_ctx_t *ctx, DWORD flags, BOOL funcprot, Di
...
@@ -446,6 +447,8 @@ static HRESULT create_function(script_ctx_t *ctx, DWORD flags, BOOL funcprot, Di
if
(
funcprot
)
if
(
funcprot
)
hres
=
init_dispex
(
&
function
->
dispex
,
ctx
,
&
Function_info
,
prototype
);
hres
=
init_dispex
(
&
function
->
dispex
,
ctx
,
&
Function_info
,
prototype
);
else
if
(
builtin_info
)
hres
=
init_dispex_from_constr
(
&
function
->
dispex
,
ctx
,
builtin_info
,
ctx
->
function_constr
);
else
else
hres
=
init_dispex_from_constr
(
&
function
->
dispex
,
ctx
,
&
Function_info
,
ctx
->
function_constr
);
hres
=
init_dispex_from_constr
(
&
function
->
dispex
,
ctx
,
&
Function_info
,
ctx
->
function_constr
);
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
...
@@ -473,13 +476,13 @@ static HRESULT create_function(script_ctx_t *ctx, DWORD flags, BOOL funcprot, Di
...
@@ -473,13 +476,13 @@ static HRESULT create_function(script_ctx_t *ctx, DWORD flags, BOOL funcprot, Di
return
S_OK
;
return
S_OK
;
}
}
HRESULT
create_builtin_function
(
script_ctx_t
*
ctx
,
builtin_invoke_t
value_proc
,
DWORD
flags
,
HRESULT
create_builtin_function
(
script_ctx_t
*
ctx
,
builtin_invoke_t
value_proc
,
DispatchEx
*
prototype
,
DispatchEx
**
ret
)
const
builtin_info_t
*
builtin_info
,
DWORD
flags
,
DispatchEx
*
prototype
,
DispatchEx
**
ret
)
{
{
FunctionInstance
*
function
;
FunctionInstance
*
function
;
HRESULT
hres
;
HRESULT
hres
;
hres
=
create_function
(
ctx
,
flags
,
FALSE
,
prototype
,
&
function
);
hres
=
create_function
(
ctx
,
builtin_info
,
flags
,
FALSE
,
prototype
,
&
function
);
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
hres
;
return
hres
;
...
@@ -502,7 +505,7 @@ HRESULT create_source_function(parser_ctx_t *ctx, parameter_t *parameters, sourc
...
@@ -502,7 +505,7 @@ HRESULT create_source_function(parser_ctx_t *ctx, parameter_t *parameters, sourc
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
hres
;
return
hres
;
hres
=
create_function
(
ctx
->
script
,
PROPF_CONSTR
,
FALSE
,
prototype
,
&
function
);
hres
=
create_function
(
ctx
->
script
,
NULL
,
PROPF_CONSTR
,
FALSE
,
prototype
,
&
function
);
jsdisp_release
(
prototype
);
jsdisp_release
(
prototype
);
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
hres
;
return
hres
;
...
@@ -534,13 +537,13 @@ HRESULT init_function_constr(script_ctx_t *ctx)
...
@@ -534,13 +537,13 @@ HRESULT init_function_constr(script_ctx_t *ctx)
FunctionInstance
*
prot
,
*
constr
;
FunctionInstance
*
prot
,
*
constr
;
HRESULT
hres
;
HRESULT
hres
;
hres
=
create_function
(
ctx
,
PROPF_CONSTR
,
TRUE
,
NULL
,
&
prot
);
hres
=
create_function
(
ctx
,
NULL
,
PROPF_CONSTR
,
TRUE
,
NULL
,
&
prot
);
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
hres
;
return
hres
;
prot
->
value_proc
=
FunctionProt_value
;
prot
->
value_proc
=
FunctionProt_value
;
hres
=
create_function
(
ctx
,
PROPF_CONSTR
,
TRUE
,
&
prot
->
dispex
,
&
constr
);
hres
=
create_function
(
ctx
,
NULL
,
PROPF_CONSTR
,
TRUE
,
&
prot
->
dispex
,
&
constr
);
jsdisp_release
(
&
prot
->
dispex
);
jsdisp_release
(
&
prot
->
dispex
);
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
hres
;
return
hres
;
...
...
dlls/jscript/jscript.h
View file @
41e297af
...
@@ -132,7 +132,10 @@ HRESULT jsdisp_propget_name(DispatchEx*,LPCWSTR,LCID,VARIANT*,jsexcept_t*,IServi
...
@@ -132,7 +132,10 @@ HRESULT jsdisp_propget_name(DispatchEx*,LPCWSTR,LCID,VARIANT*,jsexcept_t*,IServi
HRESULT
jsdisp_propget_idx
(
DispatchEx
*
,
DWORD
,
LCID
,
VARIANT
*
,
jsexcept_t
*
,
IServiceProvider
*
);
HRESULT
jsdisp_propget_idx
(
DispatchEx
*
,
DWORD
,
LCID
,
VARIANT
*
,
jsexcept_t
*
,
IServiceProvider
*
);
HRESULT
jsdisp_get_id
(
DispatchEx
*
,
const
WCHAR
*
,
DWORD
,
DISPID
*
);
HRESULT
jsdisp_get_id
(
DispatchEx
*
,
const
WCHAR
*
,
DWORD
,
DISPID
*
);
HRESULT
create_builtin_function
(
script_ctx_t
*
,
builtin_invoke_t
,
DWORD
,
DispatchEx
*
,
DispatchEx
**
);
HRESULT
create_builtin_function
(
script_ctx_t
*
,
builtin_invoke_t
,
const
builtin_info_t
*
,
DWORD
,
DispatchEx
*
,
DispatchEx
**
);
HRESULT
Function_value
(
DispatchEx
*
,
LCID
,
WORD
,
DISPPARAMS
*
,
VARIANT
*
,
jsexcept_t
*
,
IServiceProvider
*
);
HRESULT
create_object
(
script_ctx_t
*
,
DispatchEx
*
,
DispatchEx
**
);
HRESULT
create_object
(
script_ctx_t
*
,
DispatchEx
*
,
DispatchEx
**
);
HRESULT
create_math
(
script_ctx_t
*
,
DispatchEx
**
);
HRESULT
create_math
(
script_ctx_t
*
,
DispatchEx
**
);
...
...
dlls/jscript/number.c
View file @
41e297af
...
@@ -263,7 +263,7 @@ HRESULT create_number_constr(script_ctx_t *ctx, DispatchEx **ret)
...
@@ -263,7 +263,7 @@ HRESULT create_number_constr(script_ctx_t *ctx, DispatchEx **ret)
return
hres
;
return
hres
;
V_VT
(
&
number
->
num
)
=
VT_I4
;
V_VT
(
&
number
->
num
)
=
VT_I4
;
hres
=
create_builtin_function
(
ctx
,
NumberConstr_value
,
PROPF_CONSTR
,
&
number
->
dispex
,
ret
);
hres
=
create_builtin_function
(
ctx
,
NumberConstr_value
,
NULL
,
PROPF_CONSTR
,
&
number
->
dispex
,
ret
);
jsdisp_release
(
&
number
->
dispex
);
jsdisp_release
(
&
number
->
dispex
);
return
hres
;
return
hres
;
...
...
dlls/jscript/object.c
View file @
41e297af
...
@@ -154,7 +154,7 @@ HRESULT create_object_constr(script_ctx_t *ctx, DispatchEx **ret)
...
@@ -154,7 +154,7 @@ HRESULT create_object_constr(script_ctx_t *ctx, DispatchEx **ret)
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
hres
;
return
hres
;
hres
=
create_builtin_function
(
ctx
,
ObjectConstr_value
,
PROPF_CONSTR
,
object
,
ret
);
hres
=
create_builtin_function
(
ctx
,
ObjectConstr_value
,
NULL
,
PROPF_CONSTR
,
object
,
ret
);
jsdisp_release
(
object
);
jsdisp_release
(
object
);
return
hres
;
return
hres
;
...
...
dlls/jscript/regexp.c
View file @
41e297af
...
@@ -3685,7 +3685,7 @@ HRESULT create_regexp_constr(script_ctx_t *ctx, DispatchEx **ret)
...
@@ -3685,7 +3685,7 @@ HRESULT create_regexp_constr(script_ctx_t *ctx, DispatchEx **ret)
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
hres
;
return
hres
;
hres
=
create_builtin_function
(
ctx
,
RegExpConstr_value
,
PROPF_CONSTR
,
&
regexp
->
dispex
,
ret
);
hres
=
create_builtin_function
(
ctx
,
RegExpConstr_value
,
NULL
,
PROPF_CONSTR
,
&
regexp
->
dispex
,
ret
);
jsdisp_release
(
&
regexp
->
dispex
);
jsdisp_release
(
&
regexp
->
dispex
);
return
hres
;
return
hres
;
...
...
dlls/jscript/string.c
View file @
41e297af
...
@@ -1370,7 +1370,7 @@ HRESULT create_string_constr(script_ctx_t *ctx, DispatchEx **ret)
...
@@ -1370,7 +1370,7 @@ HRESULT create_string_constr(script_ctx_t *ctx, DispatchEx **ret)
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
hres
;
return
hres
;
hres
=
create_builtin_function
(
ctx
,
StringConstr_value
,
PROPF_CONSTR
,
&
string
->
dispex
,
ret
);
hres
=
create_builtin_function
(
ctx
,
StringConstr_value
,
NULL
,
PROPF_CONSTR
,
&
string
->
dispex
,
ret
);
jsdisp_release
(
&
string
->
dispex
);
jsdisp_release
(
&
string
->
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