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
fb29bf7d
Commit
fb29bf7d
authored
Feb 15, 2013
by
Piotr Caban
Committed by
Alexandre Julliard
Feb 15, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Rename vbsheap to heap_pool.
parent
7246f7f3
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
26 additions
and
26 deletions
+26
-26
compile.c
dlls/vbscript/compile.c
+4
-4
interp.c
dlls/vbscript/interp.c
+6
-6
parse.h
dlls/vbscript/parse.h
+1
-1
parser.y
dlls/vbscript/parser.y
+3
-3
vbscript.c
dlls/vbscript/vbscript.c
+3
-3
vbscript.h
dlls/vbscript/vbscript.h
+6
-6
vbscript_main.c
dlls/vbscript/vbscript_main.c
+3
-3
No files found.
dlls/vbscript/compile.c
View file @
fb29bf7d
...
...
@@ -118,14 +118,14 @@ static void dump_code(compile_ctx_t *ctx)
static
inline
void
*
compiler_alloc
(
vbscode_t
*
vbscode
,
size_t
size
)
{
return
vbsheap
_alloc
(
&
vbscode
->
heap
,
size
);
return
heap_pool
_alloc
(
&
vbscode
->
heap
,
size
);
}
static
inline
void
*
compiler_alloc_zero
(
vbscode_t
*
vbscode
,
size_t
size
)
{
void
*
ret
;
ret
=
vbsheap
_alloc
(
&
vbscode
->
heap
,
size
);
ret
=
heap_pool
_alloc
(
&
vbscode
->
heap
,
size
);
if
(
ret
)
memset
(
ret
,
0
,
size
);
return
ret
;
...
...
@@ -1585,7 +1585,7 @@ void release_vbscode(vbscode_t *code)
for
(
i
=
0
;
i
<
code
->
bstr_cnt
;
i
++
)
SysFreeString
(
code
->
bstr_pool
[
i
]);
vbsheap
_free
(
&
code
->
heap
);
heap_pool
_free
(
&
code
->
heap
);
heap_free
(
code
->
bstr_pool
);
heap_free
(
code
->
source
);
...
...
@@ -1615,7 +1615,7 @@ static vbscode_t *alloc_vbscode(compile_ctx_t *ctx, const WCHAR *source)
ctx
->
instr_cnt
=
1
;
ctx
->
instr_size
=
32
;
vbsheap
_init
(
&
ret
->
heap
);
heap_pool
_init
(
&
ret
->
heap
);
ret
->
option_explicit
=
ctx
->
parser
.
option_explicit
;
...
...
dlls/vbscript/interp.c
View file @
fb29bf7d
...
...
@@ -37,7 +37,7 @@ typedef struct {
VARIANT
*
vars
;
dynamic_var_t
*
dynamic_vars
;
vbsheap
_t
heap
;
heap_pool
_t
heap
;
BOOL
resume_next
;
...
...
@@ -210,19 +210,19 @@ static HRESULT add_dynamic_var(exec_ctx_t *ctx, const WCHAR *name,
BOOL
is_const
,
VARIANT
*
val
,
BOOL
own_val
,
VARIANT
**
out_var
)
{
dynamic_var_t
*
new_var
;
vbsheap
_t
*
heap
;
heap_pool
_t
*
heap
;
WCHAR
*
str
;
unsigned
size
;
HRESULT
hres
;
heap
=
ctx
->
func
->
type
==
FUNC_GLOBAL
?
&
ctx
->
script
->
heap
:
&
ctx
->
heap
;
new_var
=
vbsheap
_alloc
(
heap
,
sizeof
(
*
new_var
));
new_var
=
heap_pool
_alloc
(
heap
,
sizeof
(
*
new_var
));
if
(
!
new_var
)
return
E_OUTOFMEMORY
;
size
=
(
strlenW
(
name
)
+
1
)
*
sizeof
(
WCHAR
);
str
=
vbsheap
_alloc
(
heap
,
size
);
str
=
heap_pool
_alloc
(
heap
,
size
);
if
(
!
str
)
return
E_OUTOFMEMORY
;
memcpy
(
str
,
name
,
size
);
...
...
@@ -1833,7 +1833,7 @@ static void release_exec(exec_ctx_t *ctx)
VariantClear
(
ctx
->
vars
+
i
);
}
vbsheap
_free
(
&
ctx
->
heap
);
heap_pool
_free
(
&
ctx
->
heap
);
heap_free
(
ctx
->
args
);
heap_free
(
ctx
->
vars
);
heap_free
(
ctx
->
stack
);
...
...
@@ -1852,7 +1852,7 @@ HRESULT exec_script(script_ctx_t *ctx, function_t *func, IDispatch *this_obj, DI
return
E_FAIL
;
}
vbsheap
_init
(
&
exec
.
heap
);
heap_pool
_init
(
&
exec
.
heap
);
if
(
func
->
arg_cnt
)
{
VARIANT
*
v
;
...
...
dlls/vbscript/parse.h
View file @
fb29bf7d
...
...
@@ -263,7 +263,7 @@ typedef struct {
statement_t
*
stats_tail
;
class_decl_t
*
class_decls
;
vbsheap
_t
heap
;
heap_pool
_t
heap
;
}
parser_ctx_t
;
HRESULT
parse_script
(
parser_ctx_t
*
,
const
WCHAR
*
,
const
WCHAR
*
)
DECLSPEC_HIDDEN
;
...
...
dlls/vbscript/parser.y
View file @
fb29bf7d
...
...
@@ -922,7 +922,7 @@ void *parser_alloc(parser_ctx_t *ctx, size_t size)
{
void *ret;
ret =
vbsheap
_alloc(&ctx->heap, size);
ret =
heap_pool
_alloc(&ctx->heap, size);
if(!ret)
ctx->hres = E_OUTOFMEMORY;
return ret;
...
...
@@ -935,7 +935,7 @@ HRESULT parse_script(parser_ctx_t *ctx, const WCHAR *code, const WCHAR *delimite
ctx->code = ctx->ptr = code;
ctx->end = ctx->code + strlenW(ctx->code);
vbsheap
_init(&ctx->heap);
heap_pool
_init(&ctx->heap);
ctx->parse_complete = FALSE;
ctx->hres = S_OK;
...
...
@@ -961,5 +961,5 @@ HRESULT parse_script(parser_ctx_t *ctx, const WCHAR *code, const WCHAR *delimite
void parser_release(parser_ctx_t *ctx)
{
vbsheap
_free(&ctx->heap);
heap_pool
_free(&ctx->heap);
}
dlls/vbscript/vbscript.c
View file @
fb29bf7d
...
...
@@ -172,8 +172,8 @@ static void release_script(script_ctx_t *ctx)
IDispatchEx_Release
(
&
script_obj
->
IDispatchEx_iface
);
}
vbsheap
_free
(
&
ctx
->
heap
);
vbsheap
_init
(
&
ctx
->
heap
);
heap_pool
_free
(
&
ctx
->
heap
);
heap_pool
_init
(
&
ctx
->
heap
);
}
static
void
destroy_script
(
script_ctx_t
*
ctx
)
...
...
@@ -568,7 +568,7 @@ static HRESULT WINAPI VBScriptParse_InitNew(IActiveScriptParse *iface)
return
E_OUTOFMEMORY
;
ctx
->
safeopt
=
This
->
safeopt
;
vbsheap
_init
(
&
ctx
->
heap
);
heap_pool
_init
(
&
ctx
->
heap
);
list_init
(
&
ctx
->
objects
);
list_init
(
&
ctx
->
code_list
);
list_init
(
&
ctx
->
named_items
);
...
...
dlls/vbscript/vbscript.h
View file @
fb29bf7d
...
...
@@ -37,11 +37,11 @@ typedef struct {
DWORD
last_block
;
DWORD
offset
;
struct
list
custom_blocks
;
}
vbsheap
_t
;
}
heap_pool
_t
;
void
vbsheap_init
(
vbsheap
_t
*
)
DECLSPEC_HIDDEN
;
void
*
vbsheap_alloc
(
vbsheap
_t
*
,
size_t
)
__WINE_ALLOC_SIZE
(
2
)
DECLSPEC_HIDDEN
;
void
vbsheap_free
(
vbsheap
_t
*
)
DECLSPEC_HIDDEN
;
void
heap_pool_init
(
heap_pool
_t
*
)
DECLSPEC_HIDDEN
;
void
*
heap_pool_alloc
(
heap_pool
_t
*
,
size_t
)
__WINE_ALLOC_SIZE
(
2
)
DECLSPEC_HIDDEN
;
void
heap_pool_free
(
heap_pool
_t
*
)
DECLSPEC_HIDDEN
;
typedef
struct
_function_t
function_t
;
typedef
struct
_vbscode_t
vbscode_t
;
...
...
@@ -177,7 +177,7 @@ struct _script_ctx_t {
class_desc_t
*
classes
;
class_desc_t
*
procs
;
vbsheap
_t
heap
;
heap_pool
_t
heap
;
struct
list
objects
;
struct
list
code_list
;
...
...
@@ -320,7 +320,7 @@ struct _vbscode_t {
BSTR
*
bstr_pool
;
unsigned
bstr_pool_size
;
unsigned
bstr_cnt
;
vbsheap
_t
heap
;
heap_pool
_t
heap
;
struct
list
entry
;
};
...
...
dlls/vbscript/vbscript_main.c
View file @
fb29bf7d
...
...
@@ -133,13 +133,13 @@ static inline DWORD block_size(DWORD block)
return
MIN_BLOCK_SIZE
<<
block
;
}
void
vbsheap_init
(
vbsheap
_t
*
heap
)
void
heap_pool_init
(
heap_pool
_t
*
heap
)
{
memset
(
heap
,
0
,
sizeof
(
*
heap
));
list_init
(
&
heap
->
custom_blocks
);
}
void
*
vbsheap_alloc
(
vbsheap
_t
*
heap
,
size_t
size
)
void
*
heap_pool_alloc
(
heap_pool
_t
*
heap
,
size_t
size
)
{
struct
list
*
list
;
void
*
tmp
;
...
...
@@ -194,7 +194,7 @@ void *vbsheap_alloc(vbsheap_t *heap, size_t size)
return
list
+
1
;
}
void
vbsheap_free
(
vbsheap
_t
*
heap
)
void
heap_pool_free
(
heap_pool
_t
*
heap
)
{
struct
list
*
iter
;
DWORD
i
;
...
...
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