From b71aaadbd25a3beba3a8cc443999dece04b38da1 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Fri, 28 Aug 2009 23:54:32 +0200 Subject: [PATCH] jscript: Get script_ctx_t as to_object arguments. --- dlls/jscript/engine.c | 6 +++--- dlls/jscript/jscript.h | 2 +- dlls/jscript/jsutils.c | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c index c9db8e656c0..8035e78ca2b 100644 --- a/dlls/jscript/engine.c +++ b/dlls/jscript/engine.c @@ -1009,7 +1009,7 @@ HRESULT with_statement_eval(exec_ctx_t *ctx, statement_t *_stat, return_type_t * if(FAILED(hres)) return hres; - hres = to_object(ctx, &val, &disp); + hres = to_object(ctx->parser->script, &val, &disp); VariantClear(&val); if(FAILED(hres)) return hres; @@ -1387,7 +1387,7 @@ HRESULT array_expression_eval(exec_ctx_t *ctx, expression_t *_expr, DWORD flags, } if(SUCCEEDED(hres)) - hres = to_object(ctx, &member, &obj); + hres = to_object(ctx->parser->script, &member, &obj); VariantClear(&member); if(SUCCEEDED(hres)) { hres = to_string(ctx->parser->script, &val, ei, &str); @@ -1437,7 +1437,7 @@ HRESULT member_expression_eval(exec_ctx_t *ctx, expression_t *_expr, DWORD flags if(FAILED(hres)) return hres; - hres = to_object(ctx, &member, &obj); + hres = to_object(ctx->parser->script, &member, &obj); VariantClear(&member); if(FAILED(hres)) return hres; diff --git a/dlls/jscript/jscript.h b/dlls/jscript/jscript.h index 807225a0ac7..01a69116c38 100644 --- a/dlls/jscript/jscript.h +++ b/dlls/jscript/jscript.h @@ -175,7 +175,7 @@ HRESULT to_integer(script_ctx_t*,VARIANT*,jsexcept_t*,VARIANT*); HRESULT to_int32(script_ctx_t*,VARIANT*,jsexcept_t*,INT*); HRESULT to_uint32(script_ctx_t*,VARIANT*,jsexcept_t*,DWORD*); HRESULT to_string(script_ctx_t*,VARIANT*,jsexcept_t*,BSTR*); -HRESULT to_object(exec_ctx_t*,VARIANT*,IDispatch**); +HRESULT to_object(script_ctx_t*,VARIANT*,IDispatch**); typedef struct named_item_t { IDispatch *disp; diff --git a/dlls/jscript/jsutils.c b/dlls/jscript/jsutils.c index 10d4f51b074..a93fb652d71 100644 --- a/dlls/jscript/jsutils.c +++ b/dlls/jscript/jsutils.c @@ -571,14 +571,14 @@ HRESULT to_string(script_ctx_t *ctx, VARIANT *v, jsexcept_t *ei, BSTR *str) } /* ECMA-262 3rd Edition 9.9 */ -HRESULT to_object(exec_ctx_t *ctx, VARIANT *v, IDispatch **disp) +HRESULT to_object(script_ctx_t *ctx, VARIANT *v, IDispatch **disp) { DispatchEx *dispex; HRESULT hres; switch(V_VT(v)) { case VT_BSTR: - hres = create_string(ctx->parser->script, V_BSTR(v), SysStringLen(V_BSTR(v)), &dispex); + hres = create_string(ctx, V_BSTR(v), SysStringLen(V_BSTR(v)), &dispex); if(FAILED(hres)) return hres; @@ -586,7 +586,7 @@ HRESULT to_object(exec_ctx_t *ctx, VARIANT *v, IDispatch **disp) break; case VT_I4: case VT_R8: - hres = create_number(ctx->parser->script, v, &dispex); + hres = create_number(ctx, v, &dispex); if(FAILED(hres)) return hres; @@ -597,7 +597,7 @@ HRESULT to_object(exec_ctx_t *ctx, VARIANT *v, IDispatch **disp) *disp = V_DISPATCH(v); break; case VT_BOOL: - hres = create_bool(ctx->parser->script, V_BOOL(v), &dispex); + hres = create_bool(ctx, V_BOOL(v), &dispex); if(FAILED(hres)) return hres;