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
4555828c
Commit
4555828c
authored
May 11, 2018
by
Jacek Caban
Committed by
Alexandre Julliard
May 11, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Use jsdisp_define_property instead of jsdisp_propput_const.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
83de7691
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
3 deletions
+11
-3
dispex.c
dlls/jscript/dispex.c
+6
-0
function.c
dlls/jscript/function.c
+2
-1
jscript.h
dlls/jscript/jscript.h
+1
-1
math.c
dlls/jscript/math.c
+2
-1
No files found.
dlls/jscript/dispex.c
View file @
4555828c
...
@@ -1701,3 +1701,9 @@ HRESULT jsdisp_define_property(jsdisp_t *obj, const WCHAR *name, property_desc_t
...
@@ -1701,3 +1701,9 @@ HRESULT jsdisp_define_property(jsdisp_t *obj, const WCHAR *name, property_desc_t
prop
->
flags
=
(
prop
->
flags
&
~
desc
->
mask
)
|
(
desc
->
flags
&
desc
->
mask
);
prop
->
flags
=
(
prop
->
flags
&
~
desc
->
mask
)
|
(
desc
->
flags
&
desc
->
mask
);
return
S_OK
;
return
S_OK
;
}
}
HRESULT
jsdisp_define_data_property
(
jsdisp_t
*
obj
,
const
WCHAR
*
name
,
unsigned
flags
,
jsval_t
value
)
{
property_desc_t
prop_desc
=
{
flags
,
flags
,
TRUE
,
value
};
return
jsdisp_define_property
(
obj
,
name
,
&
prop_desc
);
}
dlls/jscript/function.c
View file @
4555828c
...
@@ -655,7 +655,8 @@ HRESULT create_builtin_function(script_ctx_t *ctx, builtin_invoke_t value_proc,
...
@@ -655,7 +655,8 @@ HRESULT create_builtin_function(script_ctx_t *ctx, builtin_invoke_t value_proc,
return
hres
;
return
hres
;
if
(
builtin_info
)
if
(
builtin_info
)
hres
=
jsdisp_propput_const
(
&
function
->
dispex
,
lengthW
,
jsval_number
(
function
->
length
));
hres
=
jsdisp_define_data_property
(
&
function
->
dispex
,
lengthW
,
0
,
jsval_number
(
function
->
length
));
if
(
SUCCEEDED
(
hres
))
if
(
SUCCEEDED
(
hres
))
hres
=
set_prototype
(
ctx
,
&
function
->
dispex
,
prototype
);
hres
=
set_prototype
(
ctx
,
&
function
->
dispex
,
prototype
);
if
(
FAILED
(
hres
))
{
if
(
FAILED
(
hres
))
{
...
...
dlls/jscript/jscript.h
View file @
4555828c
...
@@ -284,7 +284,6 @@ HRESULT disp_propput(script_ctx_t*,IDispatch*,DISPID,jsval_t) DECLSPEC_HIDDEN;
...
@@ -284,7 +284,6 @@ HRESULT disp_propput(script_ctx_t*,IDispatch*,DISPID,jsval_t) DECLSPEC_HIDDEN;
HRESULT
jsdisp_propget
(
jsdisp_t
*
,
DISPID
,
jsval_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
jsdisp_propget
(
jsdisp_t
*
,
DISPID
,
jsval_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
jsdisp_propput
(
jsdisp_t
*
,
const
WCHAR
*
,
DWORD
,
jsval_t
)
DECLSPEC_HIDDEN
;
HRESULT
jsdisp_propput
(
jsdisp_t
*
,
const
WCHAR
*
,
DWORD
,
jsval_t
)
DECLSPEC_HIDDEN
;
HRESULT
jsdisp_propput_name
(
jsdisp_t
*
,
const
WCHAR
*
,
jsval_t
)
DECLSPEC_HIDDEN
;
HRESULT
jsdisp_propput_name
(
jsdisp_t
*
,
const
WCHAR
*
,
jsval_t
)
DECLSPEC_HIDDEN
;
HRESULT
jsdisp_propput_const
(
jsdisp_t
*
,
const
WCHAR
*
,
jsval_t
)
DECLSPEC_HIDDEN
;
HRESULT
jsdisp_propput_dontenum
(
jsdisp_t
*
,
const
WCHAR
*
,
jsval_t
)
DECLSPEC_HIDDEN
;
HRESULT
jsdisp_propput_dontenum
(
jsdisp_t
*
,
const
WCHAR
*
,
jsval_t
)
DECLSPEC_HIDDEN
;
HRESULT
jsdisp_propput_idx
(
jsdisp_t
*
,
DWORD
,
jsval_t
)
DECLSPEC_HIDDEN
;
HRESULT
jsdisp_propput_idx
(
jsdisp_t
*
,
DWORD
,
jsval_t
)
DECLSPEC_HIDDEN
;
HRESULT
jsdisp_propget_name
(
jsdisp_t
*
,
LPCWSTR
,
jsval_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
jsdisp_propget_name
(
jsdisp_t
*
,
LPCWSTR
,
jsval_t
*
)
DECLSPEC_HIDDEN
;
...
@@ -295,6 +294,7 @@ HRESULT disp_delete_name(script_ctx_t*,IDispatch*,jsstr_t*,BOOL*) DECLSPEC_HIDDE
...
@@ -295,6 +294,7 @@ HRESULT disp_delete_name(script_ctx_t*,IDispatch*,jsstr_t*,BOOL*) DECLSPEC_HIDDE
HRESULT
jsdisp_delete_idx
(
jsdisp_t
*
,
DWORD
)
DECLSPEC_HIDDEN
;
HRESULT
jsdisp_delete_idx
(
jsdisp_t
*
,
DWORD
)
DECLSPEC_HIDDEN
;
HRESULT
jsdisp_get_own_property
(
jsdisp_t
*
,
const
WCHAR
*
,
BOOL
,
property_desc_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
jsdisp_get_own_property
(
jsdisp_t
*
,
const
WCHAR
*
,
BOOL
,
property_desc_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
jsdisp_define_property
(
jsdisp_t
*
,
const
WCHAR
*
,
property_desc_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
jsdisp_define_property
(
jsdisp_t
*
,
const
WCHAR
*
,
property_desc_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
jsdisp_define_data_property
(
jsdisp_t
*
,
const
WCHAR
*
,
unsigned
,
jsval_t
)
DECLSPEC_HIDDEN
;
HRESULT
create_builtin_function
(
script_ctx_t
*
,
builtin_invoke_t
,
const
WCHAR
*
,
const
builtin_info_t
*
,
DWORD
,
HRESULT
create_builtin_function
(
script_ctx_t
*
,
builtin_invoke_t
,
const
WCHAR
*
,
const
builtin_info_t
*
,
DWORD
,
jsdisp_t
*
,
jsdisp_t
**
)
DECLSPEC_HIDDEN
;
jsdisp_t
*
,
jsdisp_t
**
)
DECLSPEC_HIDDEN
;
...
...
dlls/jscript/math.c
View file @
4555828c
...
@@ -559,7 +559,8 @@ HRESULT create_math(script_ctx_t *ctx, jsdisp_t **ret)
...
@@ -559,7 +559,8 @@ HRESULT create_math(script_ctx_t *ctx, jsdisp_t **ret)
}
}
for
(
i
=
0
;
i
<
sizeof
(
constants
)
/
sizeof
(
*
constants
);
i
++
)
{
for
(
i
=
0
;
i
<
sizeof
(
constants
)
/
sizeof
(
*
constants
);
i
++
)
{
hres
=
jsdisp_propput_const
(
math
,
constants
[
i
].
name
,
jsval_number
(
constants
[
i
].
val
));
hres
=
jsdisp_define_data_property
(
math
,
constants
[
i
].
name
,
0
,
jsval_number
(
constants
[
i
].
val
));
if
(
FAILED
(
hres
))
{
if
(
FAILED
(
hres
))
{
jsdisp_release
(
math
);
jsdisp_release
(
math
);
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