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
9e3f75cf
Commit
9e3f75cf
authored
Sep 06, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 06, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Renamed vbscode_t's variables to not suggest that they are global code-only.
parent
080169f1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
16 deletions
+21
-16
compile.c
dlls/vbscript/compile.c
+10
-10
vbscript.c
dlls/vbscript/vbscript.c
+9
-4
vbscript.h
dlls/vbscript/vbscript.h
+2
-2
No files found.
dlls/vbscript/compile.c
View file @
9e3f75cf
...
...
@@ -973,7 +973,7 @@ static HRESULT compile_const_statement(compile_ctx_t *ctx, const_statement_t *st
static
HRESULT
compile_function_statement
(
compile_ctx_t
*
ctx
,
function_statement_t
*
stat
)
{
if
(
ctx
->
func
!=
&
ctx
->
code
->
global
_code
)
{
if
(
ctx
->
func
!=
&
ctx
->
code
->
main
_code
)
{
FIXME
(
"Function is not in the global code
\n
"
);
return
E_FAIL
;
}
...
...
@@ -1615,15 +1615,15 @@ static vbscode_t *alloc_vbscode(compile_ctx_t *ctx, const WCHAR *source)
ret
->
bstr_pool
=
NULL
;
ret
->
bstr_pool_size
=
0
;
ret
->
bstr_cnt
=
0
;
ret
->
global_executed
=
FALSE
;
ret
->
pending_exec
=
FALSE
;
ret
->
global
_code
.
type
=
FUNC_GLOBAL
;
ret
->
global
_code
.
name
=
NULL
;
ret
->
global
_code
.
code_ctx
=
ret
;
ret
->
global
_code
.
vars
=
NULL
;
ret
->
global
_code
.
var_cnt
=
0
;
ret
->
global
_code
.
arg_cnt
=
0
;
ret
->
global
_code
.
args
=
NULL
;
ret
->
main
_code
.
type
=
FUNC_GLOBAL
;
ret
->
main
_code
.
name
=
NULL
;
ret
->
main
_code
.
code_ctx
=
ret
;
ret
->
main
_code
.
vars
=
NULL
;
ret
->
main
_code
.
var_cnt
=
0
;
ret
->
main
_code
.
arg_cnt
=
0
;
ret
->
main
_code
.
args
=
NULL
;
list_init
(
&
ret
->
entry
);
return
ret
;
...
...
@@ -1664,7 +1664,7 @@ HRESULT compile_script(script_ctx_t *script, const WCHAR *src, vbscode_t **ret)
ctx
.
stat_ctx
=
NULL
;
ctx
.
labels_cnt
=
ctx
.
labels_size
=
0
;
hres
=
compile_func
(
&
ctx
,
ctx
.
parser
.
stats
,
&
ctx
.
code
->
global
_code
);
hres
=
compile_func
(
&
ctx
,
ctx
.
parser
.
stats
,
&
ctx
.
code
->
main
_code
);
if
(
FAILED
(
hres
))
{
release_compiler
(
&
ctx
);
return
hres
;
...
...
dlls/vbscript/vbscript.c
View file @
9e3f75cf
...
...
@@ -77,10 +77,10 @@ static HRESULT exec_global_code(script_ctx_t *ctx, vbscode_t *code)
{
HRESULT
hres
;
code
->
global_executed
=
TRU
E
;
code
->
pending_exec
=
FALS
E
;
IActiveScriptSite_OnEnterScript
(
ctx
->
site
);
hres
=
exec_script
(
ctx
,
&
code
->
global
_code
,
NULL
,
NULL
,
NULL
);
hres
=
exec_script
(
ctx
,
&
code
->
main
_code
,
NULL
,
NULL
,
NULL
);
IActiveScriptSite_OnLeaveScript
(
ctx
->
site
);
return
hres
;
...
...
@@ -91,7 +91,7 @@ static void exec_queued_code(script_ctx_t *ctx)
vbscode_t
*
iter
;
LIST_FOR_EACH_ENTRY
(
iter
,
&
ctx
->
code_list
,
vbscode_t
,
entry
)
{
if
(
!
iter
->
global_executed
)
if
(
iter
->
pending_exec
)
exec_global_code
(
ctx
,
iter
);
}
}
...
...
@@ -604,7 +604,12 @@ static HRESULT WINAPI VBScriptParse_ParseScriptText(IActiveScriptParse *iface,
if
(
FAILED
(
hres
))
return
hres
;
return
is_started
(
This
)
?
exec_global_code
(
This
->
ctx
,
code
)
:
S_OK
;
if
(
!
is_started
(
This
))
{
code
->
pending_exec
=
TRUE
;
return
S_OK
;
}
return
exec_global_code
(
This
->
ctx
,
code
);
}
static
const
IActiveScriptParseVtbl
VBScriptParseVtbl
=
{
...
...
dlls/vbscript/vbscript.h
View file @
9e3f75cf
...
...
@@ -298,8 +298,8 @@ struct _vbscode_t {
BOOL
option_explicit
;
BOOL
global_executed
;
function_t
global
_code
;
BOOL
pending_exec
;
function_t
main
_code
;
BSTR
*
bstr_pool
;
unsigned
bstr_pool_size
;
...
...
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