Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
5fecc71d
Commit
5fecc71d
authored
12 years ago
by
Jacek Caban
Committed by
Alexandre Julliard
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
jscript: Get rid of no longer needed VARIANT helpers.
parent
a3f7f0f7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/jscript/jscript.h
+0
-33
0 additions, 33 deletions
dlls/jscript/jscript.h
dlls/jscript/jsutils.c
+12
-2
12 additions, 2 deletions
dlls/jscript/jsutils.c
with
12 additions
and
35 deletions
dlls/jscript/jscript.h
+
0
−
33
View file @
5fecc71d
...
...
@@ -387,16 +387,6 @@ static inline BOOL is_vclass(vdisp_t *vdisp, jsclass_t class)
return
is_jsdisp
(
vdisp
)
&&
is_class
(
vdisp
->
u
.
jsdisp
,
class
);
}
static
inline
BOOL
is_num_vt
(
enum
VARENUM
vt
)
{
return
vt
==
VT_I4
||
vt
==
VT_R8
;
}
static
inline
DOUBLE
num_val
(
const
VARIANT
*
v
)
{
return
V_VT
(
v
)
==
VT_I4
?
V_I4
(
v
)
:
V_R8
(
v
);
}
#ifndef INT32_MIN
#define INT32_MIN (-2147483647-1)
#endif
...
...
@@ -410,29 +400,6 @@ static inline BOOL is_int32(double d)
return
INT32_MIN
<=
d
&&
d
<=
INT32_MAX
&&
(
double
)(
int
)
d
==
d
;
}
static
inline
void
num_set_int
(
VARIANT
*
v
,
INT
i
)
{
V_VT
(
v
)
=
VT_I4
;
V_I4
(
v
)
=
i
;
}
static
inline
void
num_set_val
(
VARIANT
*
v
,
DOUBLE
d
)
{
if
(
is_int32
(
d
))
{
V_VT
(
v
)
=
VT_I4
;
V_I4
(
v
)
=
d
;
}
else
{
V_VT
(
v
)
=
VT_R8
;
V_R8
(
v
)
=
d
;
}
}
static
inline
void
var_set_jsdisp
(
VARIANT
*
v
,
jsdisp_t
*
jsdisp
)
{
V_VT
(
v
)
=
VT_DISPATCH
;
V_DISPATCH
(
v
)
=
to_disp
(
jsdisp
);
}
static
inline
DWORD
make_grfdex
(
script_ctx_t
*
ctx
,
DWORD
flags
)
{
return
(
ctx
->
version
<<
28
)
|
flags
;
...
...
This diff is collapsed.
Click to expand it.
dlls/jscript/jsutils.c
+
12
−
2
View file @
5fecc71d
...
...
@@ -352,9 +352,19 @@ HRESULT jsval_to_variant(jsval_t val, VARIANT *retv)
V_BSTR
(
retv
)
=
NULL
;
}
return
S_OK
;
case
JSV_NUMBER
:
num_set_val
(
retv
,
val
.
u
.
n
);
case
JSV_NUMBER
:
{
double
n
=
get_number
(
val
);
if
(
is_int32
(
n
))
{
V_VT
(
retv
)
=
VT_I4
;
V_I4
(
retv
)
=
n
;
}
else
{
V_VT
(
retv
)
=
VT_R8
;
V_R8
(
retv
)
=
n
;
}
return
S_OK
;
}
case
JSV_BOOL
:
V_VT
(
retv
)
=
VT_BOOL
;
V_BOOL
(
retv
)
=
val
.
u
.
b
?
VARIANT_TRUE
:
VARIANT_FALSE
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment