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
190ea000
Commit
190ea000
authored
Sep 14, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 14, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Store global functions in script_ctx_t.
parent
413bc990
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
compile.c
dlls/vbscript/compile.c
+21
-0
vbscript.h
dlls/vbscript/vbscript.h
+1
-0
No files found.
dlls/vbscript/compile.c
View file @
190ea000
...
...
@@ -674,18 +674,25 @@ static HRESULT create_function(compile_ctx_t *ctx, function_decl_t *decl, functi
static
BOOL
lookup_script_identifier
(
script_ctx_t
*
script
,
const
WCHAR
*
identifier
)
{
dynamic_var_t
*
var
;
function_t
*
func
;
for
(
var
=
script
->
global_vars
;
var
;
var
=
var
->
next
)
{
if
(
!
strcmpiW
(
var
->
name
,
identifier
))
return
TRUE
;
}
for
(
func
=
script
->
global_funcs
;
func
;
func
=
func
->
next
)
{
if
(
!
strcmpiW
(
func
->
name
,
identifier
))
return
TRUE
;
}
return
FALSE
;
}
static
HRESULT
check_script_collisions
(
compile_ctx_t
*
ctx
,
script_ctx_t
*
script
)
{
dynamic_var_t
*
var
;
function_t
*
func
;
for
(
var
=
ctx
->
global_vars
;
var
;
var
=
var
->
next
)
{
if
(
lookup_script_identifier
(
script
,
var
->
name
))
{
...
...
@@ -694,6 +701,13 @@ static HRESULT check_script_collisions(compile_ctx_t *ctx, script_ctx_t *script)
}
}
for
(
func
=
ctx
->
funcs
;
func
;
func
=
func
->
next
)
{
if
(
lookup_script_identifier
(
script
,
func
->
name
))
{
FIXME
(
"%s: redefined
\n
"
,
debugstr_w
(
func
->
name
));
return
E_FAIL
;
}
}
return
S_OK
;
}
...
...
@@ -815,6 +829,13 @@ HRESULT compile_script(script_ctx_t *script, const WCHAR *src, vbscode_t **ret)
script
->
global_vars
=
ctx
.
global_vars
;
}
if
(
ctx
.
funcs
)
{
for
(
new_func
=
ctx
.
funcs
;
new_func
->
next
;
new_func
=
new_func
->
next
);
new_func
->
next
=
script
->
global_funcs
;
script
->
global_funcs
=
ctx
.
funcs
;
}
if
(
TRACE_ON
(
vbscript_disas
))
dump_code
(
&
ctx
);
...
...
dlls/vbscript/vbscript.h
View file @
190ea000
...
...
@@ -80,6 +80,7 @@ struct _script_ctx_t {
vbdisp_t
*
script_obj
;
dynamic_var_t
*
global_vars
;
function_t
*
global_funcs
;
struct
list
code_list
;
struct
list
named_items
;
...
...
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