mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
jscript: Get script_ctx_t as to_object arguments.
This commit is contained in:
parent
90af81f405
commit
b71aaadbd2
3 changed files with 8 additions and 8 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue