Piotr Caban : vbscript: Rename vbsheap to heap_pool.
Alexandre Julliard
julliard at winehq.org
Fri Feb 15 11:19:17 CST 2013
Module: wine
Branch: master
Commit: fb29bf7d2f04607b0a8e74b2b35f7aa2cda9ebdc
URL: http://source.winehq.org/git/wine.git/?a=commit;h=fb29bf7d2f04607b0a8e74b2b35f7aa2cda9ebdc
Author: Piotr Caban <piotr at codeweavers.com>
Date: Fri Feb 15 15:11:13 2013 +0100
vbscript: Rename vbsheap to heap_pool.
---
dlls/vbscript/compile.c | 8 ++++----
dlls/vbscript/interp.c | 12 ++++++------
dlls/vbscript/parse.h | 2 +-
dlls/vbscript/parser.y | 6 +++---
dlls/vbscript/vbscript.c | 6 +++---
dlls/vbscript/vbscript.h | 12 ++++++------
dlls/vbscript/vbscript_main.c | 6 +++---
7 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/dlls/vbscript/compile.c b/dlls/vbscript/compile.c
index d324284..58494b9 100644
--- a/dlls/vbscript/compile.c
+++ b/dlls/vbscript/compile.c
@@ -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;
diff --git a/dlls/vbscript/interp.c b/dlls/vbscript/interp.c
index eace041..b3f4244 100644
--- a/dlls/vbscript/interp.c
+++ b/dlls/vbscript/interp.c
@@ -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;
diff --git a/dlls/vbscript/parse.h b/dlls/vbscript/parse.h
index 74e0a8a..ba1a311 100644
--- a/dlls/vbscript/parse.h
+++ b/dlls/vbscript/parse.h
@@ -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;
diff --git a/dlls/vbscript/parser.y b/dlls/vbscript/parser.y
index b71b92d..4b380ef 100644
--- a/dlls/vbscript/parser.y
+++ b/dlls/vbscript/parser.y
@@ -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);
}
diff --git a/dlls/vbscript/vbscript.c b/dlls/vbscript/vbscript.c
index 1195f85..48dd18c 100644
--- a/dlls/vbscript/vbscript.c
+++ b/dlls/vbscript/vbscript.c
@@ -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);
diff --git a/dlls/vbscript/vbscript.h b/dlls/vbscript/vbscript.h
index e3d96d8..f499e4f 100644
--- a/dlls/vbscript/vbscript.h
+++ b/dlls/vbscript/vbscript.h
@@ -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;
};
diff --git a/dlls/vbscript/vbscript_main.c b/dlls/vbscript/vbscript_main.c
index 9ff2a51..a06eb2c 100644
--- a/dlls/vbscript/vbscript_main.c
+++ b/dlls/vbscript/vbscript_main.c
@@ -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;
More information about the wine-cvs
mailing list