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
82368f5c
Commit
82368f5c
authored
Nov 30, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 30, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Get rid of no longer needed EXPRVAL_NAMEREF.
parent
962307da
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
39 deletions
+5
-39
engine.c
dlls/jscript/engine.c
+5
-34
engine.h
dlls/jscript/engine.h
+0
-5
No files found.
dlls/jscript/engine.c
View file @
82368f5c
...
...
@@ -31,7 +31,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(jscript);
#define EXPR_NOVAL 0x0001
#define EXPR_NEWREF 0x0002
#define EXPR_STRREF 0x0004
struct
_return_type_t
{
enum
{
...
...
@@ -154,11 +153,6 @@ static void exprval_release(exprval_t *val)
if
(
val
->
u
.
idref
.
disp
)
IDispatch_Release
(
val
->
u
.
idref
.
disp
);
return
;
case
EXPRVAL_NAMEREF
:
if
(
val
->
u
.
nameref
.
disp
)
IDispatch_Release
(
val
->
u
.
nameref
.
disp
);
SysFreeString
(
val
->
u
.
nameref
.
name
);
return
;
case
EXPRVAL_INVALID
:
SysFreeString
(
val
->
u
.
identifier
);
}
...
...
@@ -179,8 +173,6 @@ static HRESULT exprval_value(script_ctx_t *ctx, exprval_t *val, jsexcept_t *ei,
}
return
disp_propget
(
ctx
,
val
->
u
.
idref
.
disp
,
val
->
u
.
idref
.
id
,
ret
,
ei
,
NULL
/*FIXME*/
);
case
EXPRVAL_NAMEREF
:
break
;
case
EXPRVAL_INVALID
:
return
throw_type_error
(
ctx
,
ei
,
JS_E_UNDEFINED_VARIABLE
,
val
->
u
.
identifier
);
}
...
...
@@ -1494,13 +1486,6 @@ HRESULT array_expression_eval(script_ctx_t *ctx, expression_t *_expr, DWORD flag
hres
=
to_string
(
ctx
,
&
val
,
ei
,
&
str
);
VariantClear
(
&
val
);
if
(
SUCCEEDED
(
hres
))
{
if
(
flags
&
EXPR_STRREF
)
{
ret
->
type
=
EXPRVAL_NAMEREF
;
ret
->
u
.
nameref
.
disp
=
obj
;
ret
->
u
.
nameref
.
name
=
str
;
return
S_OK
;
}
hres
=
disp_get_id
(
ctx
,
obj
,
str
,
flags
&
EXPR_NEWREF
?
fdexNameEnsure
:
0
,
&
id
);
SysFreeString
(
str
);
}
...
...
@@ -1546,11 +1531,9 @@ HRESULT member_expression_eval(script_ctx_t *ctx, expression_t *_expr, DWORD fla
return
hres
;
str
=
SysAllocString
(
expr
->
identifier
);
if
(
flags
&
EXPR_STRREF
)
{
ret
->
type
=
EXPRVAL_NAMEREF
;
ret
->
u
.
nameref
.
disp
=
obj
;
ret
->
u
.
nameref
.
name
=
str
;
return
S_OK
;
if
(
!
str
)
{
IDispatch_Release
(
obj
);
return
E_OUTOFMEMORY
;
}
hres
=
disp_get_id
(
ctx
,
obj
,
str
,
flags
&
EXPR_NEWREF
?
fdexNameEnsure
:
0
,
&
id
);
...
...
@@ -2457,7 +2440,7 @@ HRESULT delete_expression_eval(script_ctx_t *ctx, expression_t *_expr, DWORD fla
TRACE
(
"
\n
"
);
hres
=
expr_eval
(
ctx
,
expr
->
expression
,
EXPR_STRREF
,
ei
,
&
exprval
);
hres
=
expr_eval
(
ctx
,
expr
->
expression
,
0
,
ei
,
&
exprval
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
@@ -2465,7 +2448,7 @@ HRESULT delete_expression_eval(script_ctx_t *ctx, expression_t *_expr, DWORD fla
case
EXPRVAL_IDREF
:
{
IDispatchEx
*
dispex
;
hres
=
IDispatch_QueryInterface
(
exprval
.
u
.
name
ref
.
disp
,
&
IID_IDispatchEx
,
(
void
**
)
&
dispex
);
hres
=
IDispatch_QueryInterface
(
exprval
.
u
.
id
ref
.
disp
,
&
IID_IDispatchEx
,
(
void
**
)
&
dispex
);
if
(
SUCCEEDED
(
hres
))
{
hres
=
IDispatchEx_DeleteMemberByDispID
(
dispex
,
exprval
.
u
.
idref
.
id
);
b
=
VARIANT_TRUE
;
...
...
@@ -2473,18 +2456,6 @@ HRESULT delete_expression_eval(script_ctx_t *ctx, expression_t *_expr, DWORD fla
}
break
;
}
case
EXPRVAL_NAMEREF
:
{
IDispatchEx
*
dispex
;
hres
=
IDispatch_QueryInterface
(
exprval
.
u
.
nameref
.
disp
,
&
IID_IDispatchEx
,
(
void
**
)
&
dispex
);
if
(
SUCCEEDED
(
hres
))
{
hres
=
IDispatchEx_DeleteMemberByName
(
dispex
,
exprval
.
u
.
nameref
.
name
,
make_grfdex
(
ctx
,
fdexNameCaseSensitive
));
b
=
VARIANT_TRUE
;
IDispatchEx_Release
(
dispex
);
}
break
;
}
default:
FIXME
(
"unsupported type %d
\n
"
,
exprval
.
type
);
hres
=
E_NOTIMPL
;
...
...
dlls/jscript/engine.h
View file @
82368f5c
...
...
@@ -364,7 +364,6 @@ typedef struct {
enum
{
EXPRVAL_VARIANT
,
EXPRVAL_IDREF
,
EXPRVAL_NAMEREF
,
EXPRVAL_INVALID
}
type
;
union
{
...
...
@@ -373,10 +372,6 @@ typedef struct {
IDispatch
*
disp
;
DISPID
id
;
}
idref
;
struct
{
IDispatch
*
disp
;
BSTR
name
;
}
nameref
;
BSTR
identifier
;
}
u
;
}
exprval_t
;
...
...
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