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
7118e6fb
Commit
7118e6fb
authored
Jun 20, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 20, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Use num_set_int in array.c.
parent
4cfab077
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
18 deletions
+9
-18
array.c
dlls/jscript/array.c
+9
-18
No files found.
dlls/jscript/array.c
View file @
7118e6fb
...
...
@@ -97,8 +97,7 @@ static HRESULT set_length(jsdisp_t *obj, jsexcept_t *ei, DWORD length)
return
S_OK
;
}
V_VT
(
&
var
)
=
VT_I4
;
V_I4
(
&
var
)
=
length
;
num_set_int
(
&
var
,
length
);
return
jsdisp_propput_name
(
obj
,
lengthW
,
&
var
,
ei
);
}
...
...
@@ -126,8 +125,7 @@ static HRESULT Array_length(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISP
switch
(
flags
)
{
case
DISPATCH_PROPERTYGET
:
V_VT
(
retv
)
=
VT_I4
;
V_I4
(
retv
)
=
This
->
length
;
num_set_int
(
retv
,
This
->
length
);
break
;
case
DISPATCH_PROPERTYPUT
:
{
DOUBLE
len
=
-
1
;
...
...
@@ -448,10 +446,8 @@ static HRESULT Array_push(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISPPAR
if
(
FAILED
(
hres
))
return
hres
;
if
(
retv
)
{
V_VT
(
retv
)
=
VT_I4
;
V_I4
(
retv
)
=
length
+
n
;
}
if
(
retv
)
num_set_int
(
retv
,
length
+
n
);
return
S_OK
;
}
...
...
@@ -909,9 +905,7 @@ static HRESULT Array_splice(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISPP
}
if
(
SUCCEEDED
(
hres
))
{
V_VT
(
&
v
)
=
VT_I4
;
V_I4
(
&
v
)
=
delete_cnt
;
num_set_int
(
&
v
,
delete_cnt
);
hres
=
jsdisp_propput_name
(
ret_array
,
lengthW
,
&
v
,
ei
);
}
}
...
...
@@ -941,8 +935,7 @@ static HRESULT Array_splice(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISPP
hres
=
jsdisp_propput_idx
(
jsthis
,
start
+
i
,
get_arg
(
dp
,
i
+
2
),
ei
);
if
(
SUCCEEDED
(
hres
))
{
V_VT
(
&
v
)
=
VT_I4
;
V_I4
(
&
v
)
=
length
-
delete_cnt
+
add_args
;
num_set_int
(
&
v
,
length
-
delete_cnt
+
add_args
);
hres
=
jsdisp_propput_name
(
jsthis
,
lengthW
,
&
v
,
ei
);
}
...
...
@@ -1036,12 +1029,10 @@ static HRESULT Array_unshift(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISP
}
if
(
retv
)
{
if
(
ctx
->
version
<
2
)
{
if
(
ctx
->
version
<
2
)
V_VT
(
retv
)
=
VT_EMPTY
;
}
else
{
V_VT
(
retv
)
=
VT_I4
;
V_I4
(
retv
)
=
length
;
}
else
num_set_int
(
retv
,
length
);
}
return
S_OK
;
}
...
...
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