jscript: jsdisp_t to IDispatch casts clean up.
This commit is contained in:
parent
2ae0f44033
commit
ac8d2f1fae
|
@ -285,7 +285,7 @@ static HRESULT invoke_prop_func(jsdisp_t *This, jsdisp_t *jsthis, dispex_prop_t
|
|||
|
||||
TRACE("call %s %p\n", debugstr_w(prop->name), V_DISPATCH(&prop->u.var));
|
||||
|
||||
hres = set_this(&new_dp, dp, (IDispatch*)_IDispatchEx_(jsthis));
|
||||
hres = set_this(&new_dp, dp, to_disp(jsthis));
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
|
|
|
@ -194,7 +194,7 @@ HRESULT create_exec_ctx(script_ctx_t *script_ctx, IDispatch *this_obj, jsdisp_t
|
|||
else if(script_ctx->host_global)
|
||||
ctx->this_obj = script_ctx->host_global;
|
||||
else
|
||||
ctx->this_obj = (IDispatch*)_IDispatchEx_(script_ctx->global);
|
||||
ctx->this_obj = to_disp(script_ctx->global);
|
||||
IDispatch_AddRef(ctx->this_obj);
|
||||
|
||||
IDispatchEx_AddRef(_IDispatchEx_(var_disp));
|
||||
|
@ -517,13 +517,13 @@ static HRESULT identifier_eval(exec_ctx_t *ctx, BSTR identifier, DWORD flags, js
|
|||
}
|
||||
|
||||
if(scope) {
|
||||
exprval_set_idref(ret, (IDispatch*)_IDispatchEx_(scope->obj), id);
|
||||
exprval_set_idref(ret, to_disp(scope->obj), id);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
hres = jsdisp_get_id(ctx->parser->script->global, identifier, 0, &id);
|
||||
if(SUCCEEDED(hres)) {
|
||||
exprval_set_idref(ret, (IDispatch*)_IDispatchEx_(ctx->parser->script->global), id);
|
||||
exprval_set_idref(ret, to_disp(ctx->parser->script->global), id);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -566,7 +566,7 @@ static HRESULT identifier_eval(exec_ctx_t *ctx, BSTR identifier, DWORD flags, js
|
|||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
exprval_set_idref(ret, (IDispatch*)_IDispatchEx_(ctx->parser->script->global), id);
|
||||
exprval_set_idref(ret, to_disp(ctx->parser->script->global), id);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -2017,7 +2017,7 @@ static HRESULT instanceof_eval(exec_ctx_t *ctx, VARIANT *inst, VARIANT *objv, js
|
|||
if(V_VT(inst) == VT_DISPATCH)
|
||||
tmp = iface_to_jsdisp((IUnknown*)V_DISPATCH(inst));
|
||||
for(iter = tmp; iter; iter = iter->prototype) {
|
||||
hres = disp_cmp(V_DISPATCH(&var), (IDispatch*)_IDispatchEx_(iter), &b);
|
||||
hres = disp_cmp(V_DISPATCH(&var), to_disp(iter), &b);
|
||||
if(FAILED(hres))
|
||||
break;
|
||||
if(b) {
|
||||
|
|
|
@ -196,7 +196,7 @@ static HRESULT invoke_source(script_ctx_t *ctx, FunctionInstance *function, IDis
|
|||
return E_FAIL;
|
||||
}
|
||||
|
||||
hres = create_arguments(ctx, (IDispatch*)_IDispatchEx_(&function->dispex),
|
||||
hres = create_arguments(ctx, to_disp(&function->dispex),
|
||||
dp, ei, caller, &arg_disp);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
@ -239,7 +239,7 @@ static HRESULT invoke_constructor(script_ctx_t *ctx, FunctionInstance *function,
|
|||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
hres = invoke_source(ctx, function, (IDispatch*)_IDispatchEx_(this_obj), dp, &var, ei, caller);
|
||||
hres = invoke_source(ctx, function, to_disp(this_obj), dp, &var, ei, caller);
|
||||
if(FAILED(hres)) {
|
||||
jsdisp_release(this_obj);
|
||||
return hres;
|
||||
|
@ -793,7 +793,7 @@ static HRESULT construct_function(script_ctx_t *ctx, DISPPARAMS *dp, jsexcept_t
|
|||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
*ret = (IDispatch*)_IDispatchEx_(function);
|
||||
*ret = to_disp(function);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -558,7 +558,7 @@ static HRESULT WINAPI JScript_GetScriptDispatch(IActiveScript *iface, LPCOLESTR
|
|||
return E_UNEXPECTED;
|
||||
}
|
||||
|
||||
*ppdisp = (IDispatch*)_IDispatchEx_(This->ctx->global);
|
||||
*ppdisp = to_disp(This->ctx->global);
|
||||
IDispatch_AddRef(*ppdisp);
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -779,7 +779,7 @@ static HRESULT WINAPI JScriptParseProcedure_ParseProcedureText(IActiveScriptPars
|
|||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
*ppdisp = (IDispatch*)_IDispatchEx_(dispex);
|
||||
*ppdisp = to_disp(dispex);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -602,7 +602,7 @@ HRESULT to_object(script_ctx_t *ctx, VARIANT *v, IDispatch **disp)
|
|||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
*disp = (IDispatch*)_IDispatchEx_(dispex);
|
||||
*disp = to_disp(dispex);
|
||||
break;
|
||||
case VT_I4:
|
||||
case VT_R8:
|
||||
|
@ -610,7 +610,7 @@ HRESULT to_object(script_ctx_t *ctx, VARIANT *v, IDispatch **disp)
|
|||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
*disp = (IDispatch*)_IDispatchEx_(dispex);
|
||||
*disp = to_disp(dispex);
|
||||
break;
|
||||
case VT_DISPATCH:
|
||||
if(V_DISPATCH(v)) {
|
||||
|
@ -623,7 +623,7 @@ HRESULT to_object(script_ctx_t *ctx, VARIANT *v, IDispatch **disp)
|
|||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
*disp = (IDispatch*)_IDispatchEx_(obj);
|
||||
*disp = to_disp(obj);
|
||||
}
|
||||
break;
|
||||
case VT_BOOL:
|
||||
|
@ -631,7 +631,7 @@ HRESULT to_object(script_ctx_t *ctx, VARIANT *v, IDispatch **disp)
|
|||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
*disp = (IDispatch*)_IDispatchEx_(dispex);
|
||||
*disp = to_disp(dispex);
|
||||
break;
|
||||
default:
|
||||
FIXME("unsupported vt %d\n", V_VT(v));
|
||||
|
|
|
@ -3638,7 +3638,7 @@ static HRESULT create_match_array(script_ctx_t *ctx, BSTR input, const match_res
|
|||
return hres;
|
||||
}
|
||||
|
||||
*ret = (IDispatch*)_IDispatchEx_(array);
|
||||
*ret = to_disp(array);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue