jscript: Rename DispatchEx to jsdisp_t to match jscript naming convention.
This commit is contained in:
parent
4a352bd78d
commit
8c2a548b54
|
@ -181,9 +181,9 @@ static HRESULT ActiveXObject_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flag
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT create_activex_constr(script_ctx_t *ctx, DispatchEx **ret)
|
||||
HRESULT create_activex_constr(script_ctx_t *ctx, jsdisp_t **ret)
|
||||
{
|
||||
DispatchEx *prototype;
|
||||
jsdisp_t *prototype;
|
||||
HRESULT hres;
|
||||
|
||||
static const WCHAR ActiveXObjectW[] = {'A','c','t','i','v','e','X','O','b','j','e','c','t',0};
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
WINE_DEFAULT_DEBUG_CHANNEL(jscript);
|
||||
|
||||
typedef struct {
|
||||
DispatchEx dispex;
|
||||
jsdisp_t dispex;
|
||||
|
||||
DWORD length;
|
||||
} ArrayInstance;
|
||||
|
@ -56,7 +56,7 @@ static inline ArrayInstance *array_this(vdisp_t *jsthis)
|
|||
return is_vclass(jsthis, JSCLASS_ARRAY) ? array_from_vdisp(jsthis) : NULL;
|
||||
}
|
||||
|
||||
static HRESULT get_length(script_ctx_t *ctx, vdisp_t *vdisp, jsexcept_t *ei, DispatchEx **jsthis, DWORD *ret)
|
||||
static HRESULT get_length(script_ctx_t *ctx, vdisp_t *vdisp, jsexcept_t *ei, jsdisp_t **jsthis, DWORD *ret)
|
||||
{
|
||||
ArrayInstance *array;
|
||||
VARIANT var;
|
||||
|
@ -85,7 +85,7 @@ static HRESULT get_length(script_ctx_t *ctx, vdisp_t *vdisp, jsexcept_t *ei, Dis
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT set_length(DispatchEx *obj, jsexcept_t *ei, DWORD length)
|
||||
static HRESULT set_length(jsdisp_t *obj, jsexcept_t *ei, DWORD length)
|
||||
{
|
||||
VARIANT var;
|
||||
|
||||
|
@ -158,7 +158,7 @@ static HRESULT Array_length(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISP
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT concat_array(DispatchEx *array, ArrayInstance *obj, DWORD *len,
|
||||
static HRESULT concat_array(jsdisp_t *array, ArrayInstance *obj, DWORD *len,
|
||||
jsexcept_t *ei, IServiceProvider *caller)
|
||||
{
|
||||
VARIANT var;
|
||||
|
@ -182,9 +182,9 @@ static HRESULT concat_array(DispatchEx *array, ArrayInstance *obj, DWORD *len,
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT concat_obj(DispatchEx *array, IDispatch *obj, DWORD *len, jsexcept_t *ei, IServiceProvider *caller)
|
||||
static HRESULT concat_obj(jsdisp_t *array, IDispatch *obj, DWORD *len, jsexcept_t *ei, IServiceProvider *caller)
|
||||
{
|
||||
DispatchEx *jsobj;
|
||||
jsdisp_t *jsobj;
|
||||
VARIANT var;
|
||||
HRESULT hres;
|
||||
|
||||
|
@ -206,7 +206,7 @@ static HRESULT concat_obj(DispatchEx *array, IDispatch *obj, DWORD *len, jsexcep
|
|||
static HRESULT Array_concat(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISPPARAMS *dp,
|
||||
VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller)
|
||||
{
|
||||
DispatchEx *ret;
|
||||
jsdisp_t *ret;
|
||||
DWORD len = 0;
|
||||
HRESULT hres;
|
||||
|
||||
|
@ -244,7 +244,7 @@ static HRESULT Array_concat(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISP
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT array_join(script_ctx_t *ctx, DispatchEx *array, DWORD length, const WCHAR *sep, VARIANT *retv,
|
||||
static HRESULT array_join(script_ctx_t *ctx, jsdisp_t *array, DWORD length, const WCHAR *sep, VARIANT *retv,
|
||||
jsexcept_t *ei, IServiceProvider *caller)
|
||||
{
|
||||
BSTR *str_tab, ret = NULL;
|
||||
|
@ -348,7 +348,7 @@ static HRESULT array_join(script_ctx_t *ctx, DispatchEx *array, DWORD length, co
|
|||
static HRESULT Array_join(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISPPARAMS *dp,
|
||||
VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller)
|
||||
{
|
||||
DispatchEx *jsthis;
|
||||
jsdisp_t *jsthis;
|
||||
DWORD length;
|
||||
HRESULT hres;
|
||||
|
||||
|
@ -378,7 +378,7 @@ static HRESULT Array_join(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISPPAR
|
|||
static HRESULT Array_pop(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISPPARAMS *dp,
|
||||
VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller)
|
||||
{
|
||||
DispatchEx *jsthis;
|
||||
jsdisp_t *jsthis;
|
||||
VARIANT val;
|
||||
DWORD length;
|
||||
HRESULT hres;
|
||||
|
@ -429,7 +429,7 @@ static HRESULT Array_pop(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISPPARA
|
|||
static HRESULT Array_push(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISPPARAMS *dp,
|
||||
VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
|
||||
{
|
||||
DispatchEx *jsthis;
|
||||
jsdisp_t *jsthis;
|
||||
DWORD length = 0;
|
||||
int i, n;
|
||||
HRESULT hres;
|
||||
|
@ -461,7 +461,7 @@ static HRESULT Array_push(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISPPAR
|
|||
static HRESULT Array_reverse(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISPPARAMS *dp,
|
||||
VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
|
||||
{
|
||||
DispatchEx *jsthis;
|
||||
jsdisp_t *jsthis;
|
||||
DWORD length, k, l;
|
||||
VARIANT v1, v2;
|
||||
HRESULT hres1, hres2;
|
||||
|
@ -520,7 +520,7 @@ static HRESULT Array_reverse(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISP
|
|||
static HRESULT Array_shift(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISPPARAMS *dp,
|
||||
VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller)
|
||||
{
|
||||
DispatchEx *jsthis;
|
||||
jsdisp_t *jsthis;
|
||||
DWORD length = 0, i;
|
||||
VARIANT v, ret;
|
||||
HRESULT hres;
|
||||
|
@ -574,7 +574,7 @@ static HRESULT Array_shift(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISPPA
|
|||
static HRESULT Array_slice(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISPPARAMS *dp,
|
||||
VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
|
||||
{
|
||||
DispatchEx *arr, *jsthis;
|
||||
jsdisp_t *arr, *jsthis;
|
||||
VARIANT v;
|
||||
DOUBLE range;
|
||||
DWORD length, start, end, idx;
|
||||
|
@ -650,7 +650,7 @@ static HRESULT Array_slice(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISPPA
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT sort_cmp(script_ctx_t *ctx, DispatchEx *cmp_func, VARIANT *v1, VARIANT *v2, jsexcept_t *ei,
|
||||
static HRESULT sort_cmp(script_ctx_t *ctx, jsdisp_t *cmp_func, VARIANT *v1, VARIANT *v2, jsexcept_t *ei,
|
||||
IServiceProvider *caller, INT *cmp)
|
||||
{
|
||||
HRESULT hres;
|
||||
|
@ -711,7 +711,7 @@ static HRESULT sort_cmp(script_ctx_t *ctx, DispatchEx *cmp_func, VARIANT *v1, VA
|
|||
static HRESULT Array_sort(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISPPARAMS *dp,
|
||||
VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller)
|
||||
{
|
||||
DispatchEx *jsthis, *cmp_func = NULL;
|
||||
jsdisp_t *jsthis, *cmp_func = NULL;
|
||||
VARIANT *vtab, **sorttab = NULL;
|
||||
DWORD length;
|
||||
DWORD i;
|
||||
|
@ -869,7 +869,7 @@ static HRESULT Array_splice(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISPP
|
|||
VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller)
|
||||
{
|
||||
DWORD length, start=0, delete_cnt=0, argc, i, add_args = 0;
|
||||
DispatchEx *ret_array = NULL, *jsthis;
|
||||
jsdisp_t *ret_array = NULL, *jsthis;
|
||||
VARIANT v;
|
||||
HRESULT hres = S_OK;
|
||||
|
||||
|
@ -1000,7 +1000,7 @@ static HRESULT Array_toLocaleString(script_ctx_t *ctx, vdisp_t *vthis, WORD flag
|
|||
static HRESULT Array_unshift(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISPPARAMS *dp,
|
||||
VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller)
|
||||
{
|
||||
DispatchEx *jsthis;
|
||||
jsdisp_t *jsthis;
|
||||
WCHAR buf[14], *buf_end, *str;
|
||||
DWORD argc, i, length;
|
||||
VARIANT var;
|
||||
|
@ -1081,12 +1081,12 @@ static HRESULT Array_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISPP
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static void Array_destructor(DispatchEx *dispex)
|
||||
static void Array_destructor(jsdisp_t *dispex)
|
||||
{
|
||||
heap_free(dispex);
|
||||
}
|
||||
|
||||
static void Array_on_put(DispatchEx *dispex, const WCHAR *name)
|
||||
static void Array_on_put(jsdisp_t *dispex, const WCHAR *name)
|
||||
{
|
||||
ArrayInstance *array = (ArrayInstance*)dispex;
|
||||
const WCHAR *ptr = name;
|
||||
|
@ -1135,7 +1135,7 @@ static const builtin_info_t Array_info = {
|
|||
static HRESULT ArrayConstr_value(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISPPARAMS *dp,
|
||||
VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller)
|
||||
{
|
||||
DispatchEx *obj;
|
||||
jsdisp_t *obj;
|
||||
VARIANT *arg_var;
|
||||
DWORD i;
|
||||
HRESULT hres;
|
||||
|
@ -1184,7 +1184,7 @@ static HRESULT ArrayConstr_value(script_ctx_t *ctx, vdisp_t *vthis, WORD flags,
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT alloc_array(script_ctx_t *ctx, DispatchEx *object_prototype, ArrayInstance **ret)
|
||||
static HRESULT alloc_array(script_ctx_t *ctx, jsdisp_t *object_prototype, ArrayInstance **ret)
|
||||
{
|
||||
ArrayInstance *array;
|
||||
HRESULT hres;
|
||||
|
@ -1207,7 +1207,7 @@ static HRESULT alloc_array(script_ctx_t *ctx, DispatchEx *object_prototype, Arra
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT create_array_constr(script_ctx_t *ctx, DispatchEx *object_prototype, DispatchEx **ret)
|
||||
HRESULT create_array_constr(script_ctx_t *ctx, jsdisp_t *object_prototype, jsdisp_t **ret)
|
||||
{
|
||||
ArrayInstance *array;
|
||||
HRESULT hres;
|
||||
|
@ -1224,7 +1224,7 @@ HRESULT create_array_constr(script_ctx_t *ctx, DispatchEx *object_prototype, Dis
|
|||
return hres;
|
||||
}
|
||||
|
||||
HRESULT create_array(script_ctx_t *ctx, DWORD length, DispatchEx **ret)
|
||||
HRESULT create_array(script_ctx_t *ctx, DWORD length, jsdisp_t **ret)
|
||||
{
|
||||
ArrayInstance *array;
|
||||
HRESULT hres;
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
WINE_DEFAULT_DEBUG_CHANNEL(jscript);
|
||||
|
||||
typedef struct {
|
||||
DispatchEx dispex;
|
||||
jsdisp_t dispex;
|
||||
|
||||
VARIANT_BOOL val;
|
||||
} BoolInstance;
|
||||
|
@ -131,7 +131,7 @@ static HRESULT BoolConstr_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags,
|
|||
|
||||
switch(flags) {
|
||||
case DISPATCH_CONSTRUCT: {
|
||||
DispatchEx *bool;
|
||||
jsdisp_t *bool;
|
||||
|
||||
hres = create_bool(ctx, value, &bool);
|
||||
if(FAILED(hres))
|
||||
|
@ -157,7 +157,7 @@ static HRESULT BoolConstr_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags,
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT alloc_bool(script_ctx_t *ctx, DispatchEx *object_prototype, BoolInstance **ret)
|
||||
static HRESULT alloc_bool(script_ctx_t *ctx, jsdisp_t *object_prototype, BoolInstance **ret)
|
||||
{
|
||||
BoolInstance *bool;
|
||||
HRESULT hres;
|
||||
|
@ -180,7 +180,7 @@ static HRESULT alloc_bool(script_ctx_t *ctx, DispatchEx *object_prototype, BoolI
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT create_bool_constr(script_ctx_t *ctx, DispatchEx *object_prototype, DispatchEx **ret)
|
||||
HRESULT create_bool_constr(script_ctx_t *ctx, jsdisp_t *object_prototype, jsdisp_t **ret)
|
||||
{
|
||||
BoolInstance *bool;
|
||||
HRESULT hres;
|
||||
|
@ -198,7 +198,7 @@ HRESULT create_bool_constr(script_ctx_t *ctx, DispatchEx *object_prototype, Disp
|
|||
return hres;
|
||||
}
|
||||
|
||||
HRESULT create_bool(script_ctx_t *ctx, VARIANT_BOOL b, DispatchEx **ret)
|
||||
HRESULT create_bool(script_ctx_t *ctx, VARIANT_BOOL b, jsdisp_t **ret)
|
||||
{
|
||||
BoolInstance *bool;
|
||||
HRESULT hres;
|
||||
|
|
|
@ -33,7 +33,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(jscript);
|
|||
#define TIME_EPOCH ((ULONGLONG)(369 * 365 + 89) * 86400 * 1000)
|
||||
|
||||
typedef struct {
|
||||
DispatchEx dispex;
|
||||
jsdisp_t dispex;
|
||||
|
||||
/* ECMA-262 3rd Edition 15.9.1.1 */
|
||||
DOUBLE time;
|
||||
|
@ -2094,7 +2094,7 @@ static const builtin_info_t Date_info = {
|
|||
NULL
|
||||
};
|
||||
|
||||
static HRESULT create_date(script_ctx_t *ctx, DispatchEx *object_prototype, DOUBLE time, DispatchEx **ret)
|
||||
static HRESULT create_date(script_ctx_t *ctx, jsdisp_t *object_prototype, DOUBLE time, jsdisp_t **ret)
|
||||
{
|
||||
DateInstance *date;
|
||||
HRESULT hres;
|
||||
|
@ -2511,7 +2511,7 @@ static HRESULT DateConstr_UTC(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DI
|
|||
static HRESULT DateConstr_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISPPARAMS *dp,
|
||||
VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
|
||||
{
|
||||
DispatchEx *date;
|
||||
jsdisp_t *date;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("\n");
|
||||
|
@ -2613,9 +2613,9 @@ static const builtin_info_t DateConstr_info = {
|
|||
NULL
|
||||
};
|
||||
|
||||
HRESULT create_date_constr(script_ctx_t *ctx, DispatchEx *object_prototype, DispatchEx **ret)
|
||||
HRESULT create_date_constr(script_ctx_t *ctx, jsdisp_t *object_prototype, jsdisp_t **ret)
|
||||
{
|
||||
DispatchEx *date;
|
||||
jsdisp_t *date;
|
||||
HRESULT hres;
|
||||
|
||||
static const WCHAR DateW[] = {'D','a','t','e',0};
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
WINE_DEFAULT_DEBUG_CHANNEL(jscript);
|
||||
|
||||
/*
|
||||
* This IID is used to get DispatchEx objecto from interface.
|
||||
* This IID is used to get jsdisp_t objecto from interface.
|
||||
* We might consider using private insteface instead.
|
||||
*/
|
||||
static const IID IID_IDispatchJS =
|
||||
|
@ -51,12 +51,12 @@ struct _dispex_prop_t {
|
|||
} u;
|
||||
};
|
||||
|
||||
static inline DISPID prop_to_id(DispatchEx *This, dispex_prop_t *prop)
|
||||
static inline DISPID prop_to_id(jsdisp_t *This, dispex_prop_t *prop)
|
||||
{
|
||||
return prop - This->props;
|
||||
}
|
||||
|
||||
static inline dispex_prop_t *get_prop(DispatchEx *This, DISPID id)
|
||||
static inline dispex_prop_t *get_prop(jsdisp_t *This, DISPID id)
|
||||
{
|
||||
if(id < 0 || id >= This->prop_cnt || This->props[id].type == PROP_DELETED)
|
||||
return NULL;
|
||||
|
@ -64,7 +64,7 @@ static inline dispex_prop_t *get_prop(DispatchEx *This, DISPID id)
|
|||
return This->props+id;
|
||||
}
|
||||
|
||||
static DWORD get_flags(DispatchEx *This, dispex_prop_t *prop)
|
||||
static DWORD get_flags(jsdisp_t *This, dispex_prop_t *prop)
|
||||
{
|
||||
if(prop->type == PROP_PROTREF) {
|
||||
dispex_prop_t *parent = get_prop(This->prototype, prop->u.ref);
|
||||
|
@ -79,7 +79,7 @@ static DWORD get_flags(DispatchEx *This, dispex_prop_t *prop)
|
|||
return prop->flags;
|
||||
}
|
||||
|
||||
static const builtin_prop_t *find_builtin_prop(DispatchEx *This, const WCHAR *name)
|
||||
static const builtin_prop_t *find_builtin_prop(jsdisp_t *This, const WCHAR *name)
|
||||
{
|
||||
int min = 0, max, i, r;
|
||||
|
||||
|
@ -100,7 +100,7 @@ static const builtin_prop_t *find_builtin_prop(DispatchEx *This, const WCHAR *na
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static dispex_prop_t *alloc_prop(DispatchEx *This, const WCHAR *name, prop_type_t type, DWORD flags)
|
||||
static dispex_prop_t *alloc_prop(jsdisp_t *This, const WCHAR *name, prop_type_t type, DWORD flags)
|
||||
{
|
||||
dispex_prop_t *ret;
|
||||
|
||||
|
@ -121,7 +121,7 @@ static dispex_prop_t *alloc_prop(DispatchEx *This, const WCHAR *name, prop_type_
|
|||
return ret;
|
||||
}
|
||||
|
||||
static dispex_prop_t *alloc_protref(DispatchEx *This, const WCHAR *name, DWORD ref)
|
||||
static dispex_prop_t *alloc_protref(jsdisp_t *This, const WCHAR *name, DWORD ref)
|
||||
{
|
||||
dispex_prop_t *ret;
|
||||
|
||||
|
@ -133,7 +133,7 @@ static dispex_prop_t *alloc_protref(DispatchEx *This, const WCHAR *name, DWORD r
|
|||
return ret;
|
||||
}
|
||||
|
||||
static HRESULT find_prop_name(DispatchEx *This, const WCHAR *name, dispex_prop_t **ret)
|
||||
static HRESULT find_prop_name(jsdisp_t *This, const WCHAR *name, dispex_prop_t **ret)
|
||||
{
|
||||
const builtin_prop_t *builtin;
|
||||
dispex_prop_t *prop;
|
||||
|
@ -160,7 +160,7 @@ static HRESULT find_prop_name(DispatchEx *This, const WCHAR *name, dispex_prop_t
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT find_prop_name_prot(DispatchEx *This, const WCHAR *name, dispex_prop_t **ret)
|
||||
static HRESULT find_prop_name_prot(jsdisp_t *This, const WCHAR *name, dispex_prop_t **ret)
|
||||
{
|
||||
dispex_prop_t *prop;
|
||||
HRESULT hres;
|
||||
|
@ -190,7 +190,7 @@ static HRESULT find_prop_name_prot(DispatchEx *This, const WCHAR *name, dispex_p
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT ensure_prop_name(DispatchEx *This, const WCHAR *name, BOOL search_prot, DWORD create_flags, dispex_prop_t **ret)
|
||||
static HRESULT ensure_prop_name(jsdisp_t *This, const WCHAR *name, BOOL search_prot, DWORD create_flags, dispex_prop_t **ret)
|
||||
{
|
||||
dispex_prop_t *prop;
|
||||
HRESULT hres;
|
||||
|
@ -254,7 +254,7 @@ static HRESULT set_this(DISPPARAMS *dp, DISPPARAMS *olddp, IDispatch *jsthis)
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT invoke_prop_func(DispatchEx *This, DispatchEx *jsthis, dispex_prop_t *prop, WORD flags,
|
||||
static HRESULT invoke_prop_func(jsdisp_t *This, jsdisp_t *jsthis, dispex_prop_t *prop, WORD flags,
|
||||
DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller)
|
||||
{
|
||||
HRESULT hres;
|
||||
|
@ -306,7 +306,7 @@ static HRESULT invoke_prop_func(DispatchEx *This, DispatchEx *jsthis, dispex_pro
|
|||
return E_FAIL;
|
||||
}
|
||||
|
||||
static HRESULT prop_get(DispatchEx *This, dispex_prop_t *prop, DISPPARAMS *dp,
|
||||
static HRESULT prop_get(jsdisp_t *This, dispex_prop_t *prop, DISPPARAMS *dp,
|
||||
VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller)
|
||||
{
|
||||
HRESULT hres;
|
||||
|
@ -314,7 +314,7 @@ static HRESULT prop_get(DispatchEx *This, dispex_prop_t *prop, DISPPARAMS *dp,
|
|||
switch(prop->type) {
|
||||
case PROP_BUILTIN:
|
||||
if(prop->u.p->flags & PROPF_METHOD) {
|
||||
DispatchEx *obj;
|
||||
jsdisp_t *obj;
|
||||
hres = create_builtin_function(This->ctx, prop->u.p->invoke, prop->u.p->name, NULL,
|
||||
prop->u.p->flags, NULL, &obj);
|
||||
if(FAILED(hres))
|
||||
|
@ -353,7 +353,7 @@ static HRESULT prop_get(DispatchEx *This, dispex_prop_t *prop, DISPPARAMS *dp,
|
|||
return hres;
|
||||
}
|
||||
|
||||
static HRESULT prop_put(DispatchEx *This, dispex_prop_t *prop, VARIANT *val,
|
||||
static HRESULT prop_put(jsdisp_t *This, dispex_prop_t *prop, VARIANT *val,
|
||||
jsexcept_t *ei, IServiceProvider *caller)
|
||||
{
|
||||
HRESULT hres;
|
||||
|
@ -396,7 +396,7 @@ static HRESULT prop_put(DispatchEx *This, dispex_prop_t *prop, VARIANT *val,
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT fill_protrefs(DispatchEx *This)
|
||||
static HRESULT fill_protrefs(jsdisp_t *This)
|
||||
{
|
||||
dispex_prop_t *iter, *prop;
|
||||
HRESULT hres;
|
||||
|
@ -422,11 +422,11 @@ static HRESULT fill_protrefs(DispatchEx *This)
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
#define DISPATCHEX_THIS(iface) DEFINE_THIS(DispatchEx, IDispatchEx, iface)
|
||||
#define DISPATCHEX_THIS(iface) DEFINE_THIS(jsdisp_t, IDispatchEx, iface)
|
||||
|
||||
static HRESULT WINAPI DispatchEx_QueryInterface(IDispatchEx *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
DispatchEx *This = DISPATCHEX_THIS(iface);
|
||||
jsdisp_t *This = DISPATCHEX_THIS(iface);
|
||||
|
||||
if(IsEqualGUID(&IID_IUnknown, riid)) {
|
||||
TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
|
||||
|
@ -454,7 +454,7 @@ static HRESULT WINAPI DispatchEx_QueryInterface(IDispatchEx *iface, REFIID riid,
|
|||
|
||||
static ULONG WINAPI DispatchEx_AddRef(IDispatchEx *iface)
|
||||
{
|
||||
DispatchEx *This = DISPATCHEX_THIS(iface);
|
||||
jsdisp_t *This = DISPATCHEX_THIS(iface);
|
||||
LONG ref = InterlockedIncrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
|
@ -464,7 +464,7 @@ static ULONG WINAPI DispatchEx_AddRef(IDispatchEx *iface)
|
|||
|
||||
static ULONG WINAPI DispatchEx_Release(IDispatchEx *iface)
|
||||
{
|
||||
DispatchEx *This = DISPATCHEX_THIS(iface);
|
||||
jsdisp_t *This = DISPATCHEX_THIS(iface);
|
||||
LONG ref = InterlockedDecrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
|
@ -493,7 +493,7 @@ static ULONG WINAPI DispatchEx_Release(IDispatchEx *iface)
|
|||
|
||||
static HRESULT WINAPI DispatchEx_GetTypeInfoCount(IDispatchEx *iface, UINT *pctinfo)
|
||||
{
|
||||
DispatchEx *This = DISPATCHEX_THIS(iface);
|
||||
jsdisp_t *This = DISPATCHEX_THIS(iface);
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, pctinfo);
|
||||
|
||||
|
@ -504,7 +504,7 @@ static HRESULT WINAPI DispatchEx_GetTypeInfoCount(IDispatchEx *iface, UINT *pcti
|
|||
static HRESULT WINAPI DispatchEx_GetTypeInfo(IDispatchEx *iface, UINT iTInfo, LCID lcid,
|
||||
ITypeInfo **ppTInfo)
|
||||
{
|
||||
DispatchEx *This = DISPATCHEX_THIS(iface);
|
||||
jsdisp_t *This = DISPATCHEX_THIS(iface);
|
||||
FIXME("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
@ -513,7 +513,7 @@ static HRESULT WINAPI DispatchEx_GetIDsOfNames(IDispatchEx *iface, REFIID riid,
|
|||
LPOLESTR *rgszNames, UINT cNames, LCID lcid,
|
||||
DISPID *rgDispId)
|
||||
{
|
||||
DispatchEx *This = DISPATCHEX_THIS(iface);
|
||||
jsdisp_t *This = DISPATCHEX_THIS(iface);
|
||||
UINT i;
|
||||
HRESULT hres;
|
||||
|
||||
|
@ -533,7 +533,7 @@ static HRESULT WINAPI DispatchEx_Invoke(IDispatchEx *iface, DISPID dispIdMember,
|
|||
REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
|
||||
VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
|
||||
{
|
||||
DispatchEx *This = DISPATCHEX_THIS(iface);
|
||||
jsdisp_t *This = DISPATCHEX_THIS(iface);
|
||||
|
||||
TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
|
||||
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
|
||||
|
@ -544,7 +544,7 @@ static HRESULT WINAPI DispatchEx_Invoke(IDispatchEx *iface, DISPID dispIdMember,
|
|||
|
||||
static HRESULT WINAPI DispatchEx_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD grfdex, DISPID *pid)
|
||||
{
|
||||
DispatchEx *This = DISPATCHEX_THIS(iface);
|
||||
jsdisp_t *This = DISPATCHEX_THIS(iface);
|
||||
|
||||
TRACE("(%p)->(%s %x %p)\n", This, debugstr_w(bstrName), grfdex, pid);
|
||||
|
||||
|
@ -559,7 +559,7 @@ static HRESULT WINAPI DispatchEx_GetDispID(IDispatchEx *iface, BSTR bstrName, DW
|
|||
static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, WORD wFlags, DISPPARAMS *pdp,
|
||||
VARIANT *pvarRes, EXCEPINFO *pei, IServiceProvider *pspCaller)
|
||||
{
|
||||
DispatchEx *This = DISPATCHEX_THIS(iface);
|
||||
jsdisp_t *This = DISPATCHEX_THIS(iface);
|
||||
dispex_prop_t *prop;
|
||||
jsexcept_t jsexcept;
|
||||
HRESULT hres;
|
||||
|
@ -623,7 +623,7 @@ static HRESULT delete_prop(dispex_prop_t *prop)
|
|||
|
||||
static HRESULT WINAPI DispatchEx_DeleteMemberByName(IDispatchEx *iface, BSTR bstrName, DWORD grfdex)
|
||||
{
|
||||
DispatchEx *This = DISPATCHEX_THIS(iface);
|
||||
jsdisp_t *This = DISPATCHEX_THIS(iface);
|
||||
dispex_prop_t *prop;
|
||||
HRESULT hres;
|
||||
|
||||
|
@ -645,7 +645,7 @@ static HRESULT WINAPI DispatchEx_DeleteMemberByName(IDispatchEx *iface, BSTR bst
|
|||
|
||||
static HRESULT WINAPI DispatchEx_DeleteMemberByDispID(IDispatchEx *iface, DISPID id)
|
||||
{
|
||||
DispatchEx *This = DISPATCHEX_THIS(iface);
|
||||
jsdisp_t *This = DISPATCHEX_THIS(iface);
|
||||
dispex_prop_t *prop;
|
||||
|
||||
TRACE("(%p)->(%x)\n", This, id);
|
||||
|
@ -661,14 +661,14 @@ static HRESULT WINAPI DispatchEx_DeleteMemberByDispID(IDispatchEx *iface, DISPID
|
|||
|
||||
static HRESULT WINAPI DispatchEx_GetMemberProperties(IDispatchEx *iface, DISPID id, DWORD grfdexFetch, DWORD *pgrfdex)
|
||||
{
|
||||
DispatchEx *This = DISPATCHEX_THIS(iface);
|
||||
jsdisp_t *This = DISPATCHEX_THIS(iface);
|
||||
FIXME("(%p)->(%x %x %p)\n", This, id, grfdexFetch, pgrfdex);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DispatchEx_GetMemberName(IDispatchEx *iface, DISPID id, BSTR *pbstrName)
|
||||
{
|
||||
DispatchEx *This = DISPATCHEX_THIS(iface);
|
||||
jsdisp_t *This = DISPATCHEX_THIS(iface);
|
||||
dispex_prop_t *prop;
|
||||
|
||||
TRACE("(%p)->(%x %p)\n", This, id, pbstrName);
|
||||
|
@ -686,7 +686,7 @@ static HRESULT WINAPI DispatchEx_GetMemberName(IDispatchEx *iface, DISPID id, BS
|
|||
|
||||
static HRESULT WINAPI DispatchEx_GetNextDispID(IDispatchEx *iface, DWORD grfdex, DISPID id, DISPID *pid)
|
||||
{
|
||||
DispatchEx *This = DISPATCHEX_THIS(iface);
|
||||
jsdisp_t *This = DISPATCHEX_THIS(iface);
|
||||
dispex_prop_t *iter;
|
||||
HRESULT hres;
|
||||
|
||||
|
@ -718,7 +718,7 @@ static HRESULT WINAPI DispatchEx_GetNextDispID(IDispatchEx *iface, DWORD grfdex,
|
|||
|
||||
static HRESULT WINAPI DispatchEx_GetNameSpaceParent(IDispatchEx *iface, IUnknown **ppunk)
|
||||
{
|
||||
DispatchEx *This = DISPATCHEX_THIS(iface);
|
||||
jsdisp_t *This = DISPATCHEX_THIS(iface);
|
||||
FIXME("(%p)->(%p)\n", This, ppunk);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
@ -743,7 +743,7 @@ static IDispatchExVtbl DispatchExVtbl = {
|
|||
DispatchEx_GetNameSpaceParent
|
||||
};
|
||||
|
||||
HRESULT init_dispex(DispatchEx *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, DispatchEx *prototype)
|
||||
HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype)
|
||||
{
|
||||
TRACE("%p (%p)\n", dispex, prototype);
|
||||
|
||||
|
@ -783,12 +783,12 @@ static const builtin_info_t dispex_info = {
|
|||
NULL
|
||||
};
|
||||
|
||||
HRESULT create_dispex(script_ctx_t *ctx, const builtin_info_t *builtin_info, DispatchEx *prototype, DispatchEx **dispex)
|
||||
HRESULT create_dispex(script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype, jsdisp_t **dispex)
|
||||
{
|
||||
DispatchEx *ret;
|
||||
jsdisp_t *ret;
|
||||
HRESULT hres;
|
||||
|
||||
ret = heap_alloc_zero(sizeof(DispatchEx));
|
||||
ret = heap_alloc_zero(sizeof(jsdisp_t));
|
||||
if(!ret)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
|
@ -800,9 +800,9 @@ HRESULT create_dispex(script_ctx_t *ctx, const builtin_info_t *builtin_info, Dis
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT init_dispex_from_constr(DispatchEx *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, DispatchEx *constr)
|
||||
HRESULT init_dispex_from_constr(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *constr)
|
||||
{
|
||||
DispatchEx *prot = NULL;
|
||||
jsdisp_t *prot = NULL;
|
||||
dispex_prop_t *prop;
|
||||
HRESULT hres;
|
||||
|
||||
|
@ -850,9 +850,9 @@ HRESULT init_dispex_from_constr(DispatchEx *dispex, script_ctx_t *ctx, const bui
|
|||
return hres;
|
||||
}
|
||||
|
||||
DispatchEx *iface_to_jsdisp(IUnknown *iface)
|
||||
jsdisp_t *iface_to_jsdisp(IUnknown *iface)
|
||||
{
|
||||
DispatchEx *ret;
|
||||
jsdisp_t *ret;
|
||||
HRESULT hres;
|
||||
|
||||
hres = IUnknown_QueryInterface(iface, &IID_IDispatchJS, (void**)&ret);
|
||||
|
@ -862,7 +862,7 @@ DispatchEx *iface_to_jsdisp(IUnknown *iface)
|
|||
return ret;
|
||||
}
|
||||
|
||||
HRESULT jsdisp_get_id(DispatchEx *jsdisp, const WCHAR *name, DWORD flags, DISPID *id)
|
||||
HRESULT jsdisp_get_id(jsdisp_t *jsdisp, const WCHAR *name, DWORD flags, DISPID *id)
|
||||
{
|
||||
dispex_prop_t *prop;
|
||||
HRESULT hres;
|
||||
|
@ -883,7 +883,7 @@ HRESULT jsdisp_get_id(DispatchEx *jsdisp, const WCHAR *name, DWORD flags, DISPID
|
|||
return DISP_E_UNKNOWNNAME;
|
||||
}
|
||||
|
||||
HRESULT jsdisp_call_value(DispatchEx *jsthis, WORD flags, DISPPARAMS *dp, VARIANT *retv,
|
||||
HRESULT jsdisp_call_value(jsdisp_t *jsthis, WORD flags, DISPPARAMS *dp, VARIANT *retv,
|
||||
jsexcept_t *ei, IServiceProvider *caller)
|
||||
{
|
||||
vdisp_t vdisp;
|
||||
|
@ -895,7 +895,7 @@ HRESULT jsdisp_call_value(DispatchEx *jsthis, WORD flags, DISPPARAMS *dp, VARIAN
|
|||
return hres;
|
||||
}
|
||||
|
||||
HRESULT jsdisp_call(DispatchEx *disp, DISPID id, WORD flags, DISPPARAMS *dp, VARIANT *retv,
|
||||
HRESULT jsdisp_call(jsdisp_t *disp, DISPID id, WORD flags, DISPPARAMS *dp, VARIANT *retv,
|
||||
jsexcept_t *ei, IServiceProvider *caller)
|
||||
{
|
||||
dispex_prop_t *prop;
|
||||
|
@ -911,7 +911,7 @@ HRESULT jsdisp_call(DispatchEx *disp, DISPID id, WORD flags, DISPPARAMS *dp, VAR
|
|||
return invoke_prop_func(disp, disp, prop, flags, dp, retv, ei, caller);
|
||||
}
|
||||
|
||||
HRESULT jsdisp_call_name(DispatchEx *disp, const WCHAR *name, WORD flags, DISPPARAMS *dp, VARIANT *retv,
|
||||
HRESULT jsdisp_call_name(jsdisp_t *disp, const WCHAR *name, WORD flags, DISPPARAMS *dp, VARIANT *retv,
|
||||
jsexcept_t *ei, IServiceProvider *caller)
|
||||
{
|
||||
dispex_prop_t *prop;
|
||||
|
@ -931,7 +931,7 @@ HRESULT jsdisp_call_name(DispatchEx *disp, const WCHAR *name, WORD flags, DISPPA
|
|||
HRESULT disp_call(script_ctx_t *ctx, IDispatch *disp, DISPID id, WORD flags, DISPPARAMS *dp, VARIANT *retv,
|
||||
jsexcept_t *ei, IServiceProvider *caller)
|
||||
{
|
||||
DispatchEx *jsdisp;
|
||||
jsdisp_t *jsdisp;
|
||||
IDispatchEx *dispex;
|
||||
HRESULT hres;
|
||||
|
||||
|
@ -965,7 +965,7 @@ HRESULT disp_call(script_ctx_t *ctx, IDispatch *disp, DISPID id, WORD flags, DIS
|
|||
return hres;
|
||||
}
|
||||
|
||||
HRESULT jsdisp_propput_name(DispatchEx *obj, const WCHAR *name, VARIANT *val, jsexcept_t *ei, IServiceProvider *caller)
|
||||
HRESULT jsdisp_propput_name(jsdisp_t *obj, const WCHAR *name, VARIANT *val, jsexcept_t *ei, IServiceProvider *caller)
|
||||
{
|
||||
dispex_prop_t *prop;
|
||||
HRESULT hres;
|
||||
|
@ -977,7 +977,7 @@ HRESULT jsdisp_propput_name(DispatchEx *obj, const WCHAR *name, VARIANT *val, js
|
|||
return prop_put(obj, prop, val, ei, caller);
|
||||
}
|
||||
|
||||
HRESULT jsdisp_propput_const(DispatchEx *obj, const WCHAR *name, VARIANT *val)
|
||||
HRESULT jsdisp_propput_const(jsdisp_t *obj, const WCHAR *name, VARIANT *val)
|
||||
{
|
||||
dispex_prop_t *prop;
|
||||
HRESULT hres;
|
||||
|
@ -989,7 +989,7 @@ HRESULT jsdisp_propput_const(DispatchEx *obj, const WCHAR *name, VARIANT *val)
|
|||
return VariantCopy(&prop->u.var, val);
|
||||
}
|
||||
|
||||
HRESULT jsdisp_propput_idx(DispatchEx *obj, DWORD idx, VARIANT *val, jsexcept_t *ei, IServiceProvider *caller)
|
||||
HRESULT jsdisp_propput_idx(jsdisp_t *obj, DWORD idx, VARIANT *val, jsexcept_t *ei, IServiceProvider *caller)
|
||||
{
|
||||
WCHAR buf[12];
|
||||
|
||||
|
@ -1001,7 +1001,7 @@ HRESULT jsdisp_propput_idx(DispatchEx *obj, DWORD idx, VARIANT *val, jsexcept_t
|
|||
|
||||
HRESULT disp_propput(script_ctx_t *ctx, IDispatch *disp, DISPID id, VARIANT *val, jsexcept_t *ei, IServiceProvider *caller)
|
||||
{
|
||||
DispatchEx *jsdisp;
|
||||
jsdisp_t *jsdisp;
|
||||
HRESULT hres;
|
||||
|
||||
jsdisp = iface_to_jsdisp((IUnknown*)disp);
|
||||
|
@ -1035,7 +1035,7 @@ HRESULT disp_propput(script_ctx_t *ctx, IDispatch *disp, DISPID id, VARIANT *val
|
|||
return hres;
|
||||
}
|
||||
|
||||
HRESULT jsdisp_propget_name(DispatchEx *obj, const WCHAR *name, VARIANT *var, jsexcept_t *ei, IServiceProvider *caller)
|
||||
HRESULT jsdisp_propget_name(jsdisp_t *obj, const WCHAR *name, VARIANT *var, jsexcept_t *ei, IServiceProvider *caller)
|
||||
{
|
||||
DISPPARAMS dp = {NULL, NULL, 0, 0};
|
||||
dispex_prop_t *prop;
|
||||
|
@ -1052,7 +1052,7 @@ HRESULT jsdisp_propget_name(DispatchEx *obj, const WCHAR *name, VARIANT *var, js
|
|||
return prop_get(obj, prop, &dp, var, ei, caller);
|
||||
}
|
||||
|
||||
HRESULT jsdisp_get_idx(DispatchEx *obj, DWORD idx, VARIANT *var, jsexcept_t *ei, IServiceProvider *caller)
|
||||
HRESULT jsdisp_get_idx(jsdisp_t *obj, DWORD idx, VARIANT *var, jsexcept_t *ei, IServiceProvider *caller)
|
||||
{
|
||||
WCHAR name[12];
|
||||
DISPPARAMS dp = {NULL, NULL, 0, 0};
|
||||
|
@ -1074,7 +1074,7 @@ HRESULT jsdisp_get_idx(DispatchEx *obj, DWORD idx, VARIANT *var, jsexcept_t *ei,
|
|||
return prop_get(obj, prop, &dp, var, ei, caller);
|
||||
}
|
||||
|
||||
HRESULT jsdisp_propget(DispatchEx *jsdisp, DISPID id, VARIANT *val, jsexcept_t *ei, IServiceProvider *caller)
|
||||
HRESULT jsdisp_propget(jsdisp_t *jsdisp, DISPID id, VARIANT *val, jsexcept_t *ei, IServiceProvider *caller)
|
||||
{
|
||||
DISPPARAMS dp = {NULL,NULL,0,0};
|
||||
dispex_prop_t *prop;
|
||||
|
@ -1091,7 +1091,7 @@ HRESULT disp_propget(script_ctx_t *ctx, IDispatch *disp, DISPID id, VARIANT *val
|
|||
{
|
||||
DISPPARAMS dp = {NULL,NULL,0,0};
|
||||
IDispatchEx *dispex;
|
||||
DispatchEx *jsdisp;
|
||||
jsdisp_t *jsdisp;
|
||||
HRESULT hres;
|
||||
|
||||
jsdisp = iface_to_jsdisp((IUnknown*)disp);
|
||||
|
@ -1115,7 +1115,7 @@ HRESULT disp_propget(script_ctx_t *ctx, IDispatch *disp, DISPID id, VARIANT *val
|
|||
return hres;
|
||||
}
|
||||
|
||||
HRESULT jsdisp_delete_idx(DispatchEx *obj, DWORD idx)
|
||||
HRESULT jsdisp_delete_idx(jsdisp_t *obj, DWORD idx)
|
||||
{
|
||||
static const WCHAR formatW[] = {'%','d',0};
|
||||
WCHAR buf[12];
|
||||
|
|
|
@ -133,7 +133,7 @@ static void exprval_set_idref(exprval_t *val, IDispatch *disp, DISPID id)
|
|||
IDispatch_AddRef(disp);
|
||||
}
|
||||
|
||||
HRESULT scope_push(scope_chain_t *scope, DispatchEx *obj, scope_chain_t **ret)
|
||||
HRESULT scope_push(scope_chain_t *scope, jsdisp_t *obj, scope_chain_t **ret)
|
||||
{
|
||||
scope_chain_t *new_scope;
|
||||
|
||||
|
@ -178,7 +178,7 @@ void scope_release(scope_chain_t *scope)
|
|||
heap_free(scope);
|
||||
}
|
||||
|
||||
HRESULT create_exec_ctx(script_ctx_t *script_ctx, IDispatch *this_obj, DispatchEx *var_disp,
|
||||
HRESULT create_exec_ctx(script_ctx_t *script_ctx, IDispatch *this_obj, jsdisp_t *var_disp,
|
||||
scope_chain_t *scope, exec_ctx_t **ret)
|
||||
{
|
||||
exec_ctx_t *ctx;
|
||||
|
@ -375,7 +375,7 @@ static HRESULT literal_to_var(script_ctx_t *ctx, literal_t *literal, VARIANT *v)
|
|||
V_BOOL(v) = literal->u.bval;
|
||||
break;
|
||||
case LT_REGEXP: {
|
||||
DispatchEx *regexp;
|
||||
jsdisp_t *regexp;
|
||||
HRESULT hres;
|
||||
|
||||
hres = create_regexp(ctx, literal->u.regexp.str, literal->u.regexp.str_len,
|
||||
|
@ -425,7 +425,7 @@ HRESULT exec_source(exec_ctx_t *ctx, parser_ctx_t *parser, source_elements_t *so
|
|||
HRESULT hres = S_OK;
|
||||
|
||||
for(func = source->functions; func; func = func->next) {
|
||||
DispatchEx *func_obj;
|
||||
jsdisp_t *func_obj;
|
||||
VARIANT var;
|
||||
|
||||
hres = create_source_function(parser, func->expr->parameter_list, func->expr->source_elements,
|
||||
|
@ -1021,7 +1021,7 @@ HRESULT with_statement_eval(exec_ctx_t *ctx, statement_t *_stat, return_type_t *
|
|||
with_statement_t *stat = (with_statement_t*)_stat;
|
||||
exprval_t exprval;
|
||||
IDispatch *disp;
|
||||
DispatchEx *obj;
|
||||
jsdisp_t *obj;
|
||||
VARIANT val;
|
||||
HRESULT hres;
|
||||
|
||||
|
@ -1171,7 +1171,7 @@ HRESULT throw_statement_eval(exec_ctx_t *ctx, statement_t *_stat, return_type_t
|
|||
/* ECMA-262 3rd Edition 12.14 */
|
||||
static HRESULT catch_eval(exec_ctx_t *ctx, catch_block_t *block, return_type_t *rt, VARIANT *ret)
|
||||
{
|
||||
DispatchEx *var_disp;
|
||||
jsdisp_t *var_disp;
|
||||
VARIANT ex, val;
|
||||
HRESULT hres;
|
||||
|
||||
|
@ -1346,7 +1346,7 @@ HRESULT function_expression_eval(exec_ctx_t *ctx, expression_t *_expr, DWORD fla
|
|||
if(FAILED(hres))
|
||||
return hres;
|
||||
}else {
|
||||
DispatchEx *dispex;
|
||||
jsdisp_t *dispex;
|
||||
|
||||
hres = create_source_function(ctx->parser, expr->parameter_list, expr->source_elements, ctx->scope_chain,
|
||||
expr->src_str, expr->src_len, &dispex);
|
||||
|
@ -1692,7 +1692,7 @@ HRESULT array_literal_expression_eval(exec_ctx_t *ctx, expression_t *_expr, DWOR
|
|||
array_literal_expression_t *expr = (array_literal_expression_t*)_expr;
|
||||
DWORD length = 0, i = 0;
|
||||
array_element_t *elem;
|
||||
DispatchEx *array;
|
||||
jsdisp_t *array;
|
||||
exprval_t exprval;
|
||||
VARIANT val;
|
||||
HRESULT hres;
|
||||
|
@ -1743,7 +1743,7 @@ HRESULT property_value_expression_eval(exec_ctx_t *ctx, expression_t *_expr, DWO
|
|||
{
|
||||
property_value_expression_t *expr = (property_value_expression_t*)_expr;
|
||||
VARIANT val, tmp;
|
||||
DispatchEx *obj;
|
||||
jsdisp_t *obj;
|
||||
prop_val_t *iter;
|
||||
exprval_t exprval;
|
||||
BSTR name;
|
||||
|
@ -1991,7 +1991,7 @@ HRESULT binary_and_expression_eval(exec_ctx_t *ctx, expression_t *_expr, DWORD f
|
|||
/* ECMA-262 3rd Edition 11.8.6 */
|
||||
static HRESULT instanceof_eval(exec_ctx_t *ctx, VARIANT *inst, VARIANT *objv, jsexcept_t *ei, VARIANT *retv)
|
||||
{
|
||||
DispatchEx *obj, *iter, *tmp = NULL;
|
||||
jsdisp_t *obj, *iter, *tmp = NULL;
|
||||
VARIANT_BOOL ret = VARIANT_FALSE;
|
||||
BOOL b;
|
||||
VARIANT var;
|
||||
|
@ -2397,7 +2397,7 @@ static HRESULT typeof_exprval(exec_ctx_t *ctx, exprval_t *exprval, jsexcept_t *e
|
|||
*ret = stringW;
|
||||
break;
|
||||
case VT_DISPATCH: {
|
||||
DispatchEx *dispex;
|
||||
jsdisp_t *dispex;
|
||||
|
||||
if(V_DISPATCH(&val) && (dispex = iface_to_jsdisp((IUnknown*)V_DISPATCH(&val)))) {
|
||||
*ret = is_class(dispex, JSCLASS_FUNCTION) ? functionW : objectW;
|
||||
|
|
|
@ -83,11 +83,11 @@ static inline void *parser_alloc_tmp(parser_ctx_t *ctx, DWORD size)
|
|||
|
||||
typedef struct _scope_chain_t {
|
||||
LONG ref;
|
||||
DispatchEx *obj;
|
||||
jsdisp_t *obj;
|
||||
struct _scope_chain_t *next;
|
||||
} scope_chain_t;
|
||||
|
||||
HRESULT scope_push(scope_chain_t*,DispatchEx*,scope_chain_t**);
|
||||
HRESULT scope_push(scope_chain_t*,jsdisp_t*,scope_chain_t**);
|
||||
void scope_release(scope_chain_t*);
|
||||
|
||||
static inline void scope_addref(scope_chain_t *scope)
|
||||
|
@ -100,7 +100,7 @@ struct _exec_ctx_t {
|
|||
|
||||
parser_ctx_t *parser;
|
||||
scope_chain_t *scope_chain;
|
||||
DispatchEx *var_disp;
|
||||
jsdisp_t *var_disp;
|
||||
IDispatch *this_obj;
|
||||
};
|
||||
|
||||
|
@ -116,7 +116,7 @@ typedef enum {
|
|||
} exec_type_t;
|
||||
|
||||
void exec_release(exec_ctx_t*);
|
||||
HRESULT create_exec_ctx(script_ctx_t*,IDispatch*,DispatchEx*,scope_chain_t*,exec_ctx_t**);
|
||||
HRESULT create_exec_ctx(script_ctx_t*,IDispatch*,jsdisp_t*,scope_chain_t*,exec_ctx_t**);
|
||||
HRESULT exec_source(exec_ctx_t*,parser_ctx_t*,source_elements_t*,exec_type_t,jsexcept_t*,VARIANT*);
|
||||
|
||||
typedef struct _statement_t statement_t;
|
||||
|
@ -124,7 +124,7 @@ typedef struct _expression_t expression_t;
|
|||
typedef struct _parameter_t parameter_t;
|
||||
|
||||
HRESULT create_source_function(parser_ctx_t*,parameter_t*,source_elements_t*,scope_chain_t*,
|
||||
const WCHAR*,DWORD,DispatchEx**);
|
||||
const WCHAR*,DWORD,jsdisp_t**);
|
||||
|
||||
typedef enum {
|
||||
LT_INT,
|
||||
|
|
|
@ -36,7 +36,7 @@ static const WCHAR toStringW[] = {'t','o','S','t','r','i','n','g',0};
|
|||
static HRESULT Error_toString(script_ctx_t *ctx, vdisp_t *vthis, WORD flags,
|
||||
DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller)
|
||||
{
|
||||
DispatchEx *jsthis;
|
||||
jsdisp_t *jsthis;
|
||||
BSTR name = NULL, msg = NULL, ret = NULL;
|
||||
VARIANT v;
|
||||
HRESULT hres;
|
||||
|
@ -165,10 +165,10 @@ static const builtin_info_t ErrorInst_info = {
|
|||
NULL
|
||||
};
|
||||
|
||||
static HRESULT alloc_error(script_ctx_t *ctx, DispatchEx *prototype,
|
||||
DispatchEx *constr, DispatchEx **ret)
|
||||
static HRESULT alloc_error(script_ctx_t *ctx, jsdisp_t *prototype,
|
||||
jsdisp_t *constr, jsdisp_t **ret)
|
||||
{
|
||||
DispatchEx *err;
|
||||
jsdisp_t *err;
|
||||
HRESULT hres;
|
||||
|
||||
err = heap_alloc_zero(sizeof(*err));
|
||||
|
@ -189,10 +189,10 @@ static HRESULT alloc_error(script_ctx_t *ctx, DispatchEx *prototype,
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT create_error(script_ctx_t *ctx, DispatchEx *constr,
|
||||
UINT number, const WCHAR *msg, DispatchEx **ret)
|
||||
static HRESULT create_error(script_ctx_t *ctx, jsdisp_t *constr,
|
||||
UINT number, const WCHAR *msg, jsdisp_t **ret)
|
||||
{
|
||||
DispatchEx *err;
|
||||
jsdisp_t *err;
|
||||
VARIANT v;
|
||||
HRESULT hres;
|
||||
|
||||
|
@ -229,8 +229,8 @@ static HRESULT create_error(script_ctx_t *ctx, DispatchEx *constr,
|
|||
}
|
||||
|
||||
static HRESULT error_constr(script_ctx_t *ctx, WORD flags, DISPPARAMS *dp,
|
||||
VARIANT *retv, jsexcept_t *ei, DispatchEx *constr) {
|
||||
DispatchEx *err;
|
||||
VARIANT *retv, jsexcept_t *ei, jsdisp_t *constr) {
|
||||
jsdisp_t *err;
|
||||
UINT num = 0;
|
||||
BSTR msg = NULL;
|
||||
HRESULT hres;
|
||||
|
@ -336,7 +336,7 @@ static HRESULT URIErrorConstr_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD fla
|
|||
return error_constr(ctx, flags, dp, retv, ei, ctx->uri_error_constr);
|
||||
}
|
||||
|
||||
HRESULT init_error_constr(script_ctx_t *ctx, DispatchEx *object_prototype)
|
||||
HRESULT init_error_constr(script_ctx_t *ctx, jsdisp_t *object_prototype)
|
||||
{
|
||||
static const WCHAR ErrorW[] = {'E','r','r','o','r',0};
|
||||
static const WCHAR EvalErrorW[] = {'E','v','a','l','E','r','r','o','r',0};
|
||||
|
@ -348,7 +348,7 @@ HRESULT init_error_constr(script_ctx_t *ctx, DispatchEx *object_prototype)
|
|||
static const WCHAR URIErrorW[] = {'U','R','I','E','r','r','o','r',0};
|
||||
static const WCHAR *names[] = {ErrorW, EvalErrorW, RangeErrorW,
|
||||
ReferenceErrorW, RegExpErrorW, SyntaxErrorW, TypeErrorW, URIErrorW};
|
||||
DispatchEx **constr_addr[] = {&ctx->error_constr, &ctx->eval_error_constr,
|
||||
jsdisp_t **constr_addr[] = {&ctx->error_constr, &ctx->eval_error_constr,
|
||||
&ctx->range_error_constr, &ctx->reference_error_constr, &ctx->regexp_error_constr,
|
||||
&ctx->syntax_error_constr, &ctx->type_error_constr,
|
||||
&ctx->uri_error_constr};
|
||||
|
@ -356,7 +356,7 @@ HRESULT init_error_constr(script_ctx_t *ctx, DispatchEx *object_prototype)
|
|||
RangeErrorConstr_value, ReferenceErrorConstr_value, RegExpErrorConstr_value,
|
||||
SyntaxErrorConstr_value, TypeErrorConstr_value, URIErrorConstr_value};
|
||||
|
||||
DispatchEx *err;
|
||||
jsdisp_t *err;
|
||||
INT i;
|
||||
VARIANT v;
|
||||
HRESULT hres;
|
||||
|
@ -388,10 +388,10 @@ HRESULT init_error_constr(script_ctx_t *ctx, DispatchEx *object_prototype)
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT throw_error(script_ctx_t *ctx, jsexcept_t *ei, UINT id, const WCHAR *str, DispatchEx *constr)
|
||||
static HRESULT throw_error(script_ctx_t *ctx, jsexcept_t *ei, UINT id, const WCHAR *str, jsdisp_t *constr)
|
||||
{
|
||||
WCHAR buf[1024], *pos = NULL;
|
||||
DispatchEx *err;
|
||||
jsdisp_t *err;
|
||||
HRESULT hres;
|
||||
|
||||
buf[0] = '\0';
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
WINE_DEFAULT_DEBUG_CHANNEL(jscript);
|
||||
|
||||
typedef struct {
|
||||
DispatchEx dispex;
|
||||
jsdisp_t dispex;
|
||||
builtin_invoke_t value_proc;
|
||||
const WCHAR *name;
|
||||
DWORD flags;
|
||||
|
@ -35,7 +35,7 @@ typedef struct {
|
|||
const WCHAR *src_str;
|
||||
DWORD src_len;
|
||||
DWORD length;
|
||||
DispatchEx *arguments;
|
||||
jsdisp_t *arguments;
|
||||
} FunctionInstance;
|
||||
|
||||
static inline FunctionInstance *function_from_vdisp(vdisp_t *vdisp)
|
||||
|
@ -74,7 +74,7 @@ static IDispatch *get_this(DISPPARAMS *dp)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static HRESULT init_parameters(DispatchEx *var_disp, FunctionInstance *function, DISPPARAMS *dp,
|
||||
static HRESULT init_parameters(jsdisp_t *var_disp, FunctionInstance *function, DISPPARAMS *dp,
|
||||
jsexcept_t *ei, IServiceProvider *caller)
|
||||
{
|
||||
parameter_t *param;
|
||||
|
@ -113,16 +113,16 @@ static const builtin_info_t Arguments_info = {
|
|||
};
|
||||
|
||||
static HRESULT create_arguments(script_ctx_t *ctx, IDispatch *calee, DISPPARAMS *dp,
|
||||
jsexcept_t *ei, IServiceProvider *caller, DispatchEx **ret)
|
||||
jsexcept_t *ei, IServiceProvider *caller, jsdisp_t **ret)
|
||||
{
|
||||
DispatchEx *args;
|
||||
jsdisp_t *args;
|
||||
VARIANT var;
|
||||
DWORD i;
|
||||
HRESULT hres;
|
||||
|
||||
static const WCHAR caleeW[] = {'c','a','l','l','e','e',0};
|
||||
|
||||
args = heap_alloc_zero(sizeof(DispatchEx));
|
||||
args = heap_alloc_zero(sizeof(jsdisp_t));
|
||||
if(!args)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
|
@ -159,10 +159,10 @@ static HRESULT create_arguments(script_ctx_t *ctx, IDispatch *calee, DISPPARAMS
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT create_var_disp(script_ctx_t *ctx, FunctionInstance *function, DispatchEx *arg_disp,
|
||||
DISPPARAMS *dp, jsexcept_t *ei, IServiceProvider *caller, DispatchEx **ret)
|
||||
static HRESULT create_var_disp(script_ctx_t *ctx, FunctionInstance *function, jsdisp_t *arg_disp,
|
||||
DISPPARAMS *dp, jsexcept_t *ei, IServiceProvider *caller, jsdisp_t **ret)
|
||||
{
|
||||
DispatchEx *var_disp;
|
||||
jsdisp_t *var_disp;
|
||||
VARIANT var;
|
||||
HRESULT hres;
|
||||
|
||||
|
@ -187,7 +187,7 @@ static HRESULT create_var_disp(script_ctx_t *ctx, FunctionInstance *function, Di
|
|||
static HRESULT invoke_source(script_ctx_t *ctx, FunctionInstance *function, IDispatch *this_obj, DISPPARAMS *dp,
|
||||
VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller)
|
||||
{
|
||||
DispatchEx *var_disp, *arg_disp;
|
||||
jsdisp_t *var_disp, *arg_disp;
|
||||
exec_ctx_t *exec_ctx;
|
||||
scope_chain_t *scope;
|
||||
HRESULT hres;
|
||||
|
@ -215,7 +215,7 @@ static HRESULT invoke_source(script_ctx_t *ctx, FunctionInstance *function, IDis
|
|||
}
|
||||
jsdisp_release(var_disp);
|
||||
if(SUCCEEDED(hres)) {
|
||||
DispatchEx *prev_args;
|
||||
jsdisp_t *prev_args;
|
||||
|
||||
prev_args = function->arguments;
|
||||
function->arguments = arg_disp;
|
||||
|
@ -232,7 +232,7 @@ static HRESULT invoke_source(script_ctx_t *ctx, FunctionInstance *function, IDis
|
|||
static HRESULT invoke_constructor(script_ctx_t *ctx, FunctionInstance *function, DISPPARAMS *dp,
|
||||
VARIANT *retv, jsexcept_t *ei, IServiceProvider *caller)
|
||||
{
|
||||
DispatchEx *this_obj;
|
||||
jsdisp_t *this_obj;
|
||||
VARIANT var;
|
||||
HRESULT hres;
|
||||
|
||||
|
@ -359,7 +359,7 @@ static HRESULT Function_toString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags,
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT array_to_args(script_ctx_t *ctx, DispatchEx *arg_array, jsexcept_t *ei, IServiceProvider *caller,
|
||||
static HRESULT array_to_args(script_ctx_t *ctx, jsdisp_t *arg_array, jsexcept_t *ei, IServiceProvider *caller,
|
||||
DISPPARAMS *args)
|
||||
{
|
||||
VARIANT var, *argv;
|
||||
|
@ -422,7 +422,7 @@ static HRESULT Function_apply(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DI
|
|||
}
|
||||
|
||||
if(argc >= 2) {
|
||||
DispatchEx *arg_array = NULL;
|
||||
jsdisp_t *arg_array = NULL;
|
||||
|
||||
if(V_VT(get_arg(dp,1)) == VT_DISPATCH) {
|
||||
arg_array = iface_to_jsdisp((IUnknown*)V_DISPATCH(get_arg(dp,1)));
|
||||
|
@ -566,7 +566,7 @@ static HRESULT Function_arguments(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags
|
|||
return hres;
|
||||
}
|
||||
|
||||
static void Function_destructor(DispatchEx *dispex)
|
||||
static void Function_destructor(jsdisp_t *dispex)
|
||||
{
|
||||
FunctionInstance *This = (FunctionInstance*)dispex;
|
||||
|
||||
|
@ -595,7 +595,7 @@ static const builtin_info_t Function_info = {
|
|||
};
|
||||
|
||||
static HRESULT create_function(script_ctx_t *ctx, const builtin_info_t *builtin_info, DWORD flags,
|
||||
BOOL funcprot, DispatchEx *prototype, FunctionInstance **ret)
|
||||
BOOL funcprot, jsdisp_t *prototype, FunctionInstance **ret)
|
||||
{
|
||||
FunctionInstance *function;
|
||||
HRESULT hres;
|
||||
|
@ -620,7 +620,7 @@ static HRESULT create_function(script_ctx_t *ctx, const builtin_info_t *builtin_
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT set_prototype(script_ctx_t *ctx, DispatchEx *dispex, DispatchEx *prototype)
|
||||
static HRESULT set_prototype(script_ctx_t *ctx, jsdisp_t *dispex, jsdisp_t *prototype)
|
||||
{
|
||||
jsexcept_t jsexcept;
|
||||
VARIANT var;
|
||||
|
@ -633,7 +633,7 @@ static HRESULT set_prototype(script_ctx_t *ctx, DispatchEx *dispex, DispatchEx *
|
|||
}
|
||||
|
||||
HRESULT create_builtin_function(script_ctx_t *ctx, builtin_invoke_t value_proc, const WCHAR *name,
|
||||
const builtin_info_t *builtin_info, DWORD flags, DispatchEx *prototype, DispatchEx **ret)
|
||||
const builtin_info_t *builtin_info, DWORD flags, jsdisp_t *prototype, jsdisp_t **ret)
|
||||
{
|
||||
FunctionInstance *function;
|
||||
HRESULT hres;
|
||||
|
@ -665,10 +665,10 @@ HRESULT create_builtin_function(script_ctx_t *ctx, builtin_invoke_t value_proc,
|
|||
}
|
||||
|
||||
HRESULT create_source_function(parser_ctx_t *ctx, parameter_t *parameters, source_elements_t *source,
|
||||
scope_chain_t *scope_chain, const WCHAR *src_str, DWORD src_len, DispatchEx **ret)
|
||||
scope_chain_t *scope_chain, const WCHAR *src_str, DWORD src_len, jsdisp_t **ret)
|
||||
{
|
||||
FunctionInstance *function;
|
||||
DispatchEx *prototype;
|
||||
jsdisp_t *prototype;
|
||||
parameter_t *iter;
|
||||
DWORD length = 0;
|
||||
HRESULT hres;
|
||||
|
@ -715,7 +715,7 @@ static HRESULT construct_function(script_ctx_t *ctx, DISPPARAMS *dp, jsexcept_t
|
|||
WCHAR *str = NULL, *ptr;
|
||||
DWORD argc, len = 0, l;
|
||||
parser_ctx_t *parser;
|
||||
DispatchEx *function;
|
||||
jsdisp_t *function;
|
||||
BSTR *params = NULL;
|
||||
int i=0, j=0;
|
||||
HRESULT hres = S_OK;
|
||||
|
@ -834,7 +834,7 @@ static HRESULT FunctionProt_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags
|
|||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT init_function_constr(script_ctx_t *ctx, DispatchEx *object_prototype)
|
||||
HRESULT init_function_constr(script_ctx_t *ctx, jsdisp_t *object_prototype)
|
||||
{
|
||||
FunctionInstance *prot, *constr;
|
||||
HRESULT hres;
|
||||
|
|
|
@ -106,7 +106,7 @@ static WCHAR int_to_char(int i)
|
|||
return 'A'+i-10;
|
||||
}
|
||||
|
||||
static HRESULT constructor_call(DispatchEx *constr, WORD flags, DISPPARAMS *dp,
|
||||
static HRESULT constructor_call(jsdisp_t *constr, WORD flags, DISPPARAMS *dp,
|
||||
VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
|
||||
{
|
||||
if(flags != DISPATCH_PROPERTYGET)
|
||||
|
@ -1063,7 +1063,7 @@ static const builtin_info_t JSGlobal_info = {
|
|||
NULL
|
||||
};
|
||||
|
||||
static HRESULT init_constructors(script_ctx_t *ctx, DispatchEx *object_prototype)
|
||||
static HRESULT init_constructors(script_ctx_t *ctx, jsdisp_t *object_prototype)
|
||||
{
|
||||
HRESULT hres;
|
||||
|
||||
|
@ -1112,7 +1112,7 @@ static HRESULT init_constructors(script_ctx_t *ctx, DispatchEx *object_prototype
|
|||
|
||||
HRESULT init_global(script_ctx_t *ctx)
|
||||
{
|
||||
DispatchEx *math, *object_prototype;
|
||||
jsdisp_t *math, *object_prototype;
|
||||
VARIANT var;
|
||||
HRESULT hres;
|
||||
|
||||
|
|
|
@ -758,7 +758,7 @@ static HRESULT WINAPI JScriptParseProcedure_ParseProcedureText(IActiveScriptPars
|
|||
{
|
||||
JScript *This = ASPARSEPROC_THIS(iface);
|
||||
parser_ctx_t *parser_ctx;
|
||||
DispatchEx *dispex;
|
||||
jsdisp_t *dispex;
|
||||
HRESULT hres;
|
||||
|
||||
TRACE("(%p)->(%s %s %s %s %p %s %s %u %x %p)\n", This, debugstr_w(pstrCode), debugstr_w(pstrFormalParams),
|
||||
|
|
|
@ -60,7 +60,7 @@ void jsheap_clear(jsheap_t*);
|
|||
void jsheap_free(jsheap_t*);
|
||||
jsheap_t *jsheap_mark(jsheap_t*);
|
||||
|
||||
typedef struct DispatchEx DispatchEx;
|
||||
typedef struct jsdisp_t jsdisp_t;
|
||||
|
||||
extern HINSTANCE jscript_hinstance;
|
||||
|
||||
|
@ -87,13 +87,13 @@ typedef enum {
|
|||
JSCLASS_ARGUMENTS
|
||||
} jsclass_t;
|
||||
|
||||
DispatchEx *iface_to_jsdisp(IUnknown*);
|
||||
jsdisp_t *iface_to_jsdisp(IUnknown*);
|
||||
|
||||
typedef struct {
|
||||
union {
|
||||
IDispatch *disp;
|
||||
IDispatchEx *dispex;
|
||||
DispatchEx *jsdisp;
|
||||
jsdisp_t *jsdisp;
|
||||
} u;
|
||||
DWORD flags;
|
||||
} vdisp_t;
|
||||
|
@ -116,7 +116,7 @@ static inline BOOL is_dispex(vdisp_t *vdisp)
|
|||
return (vdisp->flags & VDISP_DISPEX) != 0;
|
||||
}
|
||||
|
||||
static inline void set_jsdisp(vdisp_t *vdisp, DispatchEx *jsdisp)
|
||||
static inline void set_jsdisp(vdisp_t *vdisp, jsdisp_t *jsdisp)
|
||||
{
|
||||
vdisp->u.jsdisp = jsdisp;
|
||||
vdisp->flags = VDISP_JSDISP | VDISP_DISPEX;
|
||||
|
@ -126,7 +126,7 @@ static inline void set_jsdisp(vdisp_t *vdisp, DispatchEx *jsdisp)
|
|||
static inline void set_disp(vdisp_t *vdisp, IDispatch *disp)
|
||||
{
|
||||
IDispatchEx *dispex;
|
||||
DispatchEx *jsdisp;
|
||||
jsdisp_t *jsdisp;
|
||||
HRESULT hres;
|
||||
|
||||
jsdisp = iface_to_jsdisp((IUnknown*)disp);
|
||||
|
@ -148,7 +148,7 @@ static inline void set_disp(vdisp_t *vdisp, IDispatch *disp)
|
|||
vdisp->flags = 0;
|
||||
}
|
||||
|
||||
static inline DispatchEx *get_jsdisp(vdisp_t *vdisp)
|
||||
static inline jsdisp_t *get_jsdisp(vdisp_t *vdisp)
|
||||
{
|
||||
return is_jsdisp(vdisp) ? vdisp->u.jsdisp : NULL;
|
||||
}
|
||||
|
@ -166,11 +166,11 @@ typedef struct {
|
|||
builtin_prop_t value_prop;
|
||||
DWORD props_cnt;
|
||||
const builtin_prop_t *props;
|
||||
void (*destructor)(DispatchEx*);
|
||||
void (*on_put)(DispatchEx*,const WCHAR*);
|
||||
void (*destructor)(jsdisp_t*);
|
||||
void (*on_put)(jsdisp_t*,const WCHAR*);
|
||||
} builtin_info_t;
|
||||
|
||||
struct DispatchEx {
|
||||
struct jsdisp_t {
|
||||
const IDispatchExVtbl *lpIDispatchExVtbl;
|
||||
|
||||
LONG ref;
|
||||
|
@ -180,39 +180,39 @@ struct DispatchEx {
|
|||
dispex_prop_t *props;
|
||||
script_ctx_t *ctx;
|
||||
|
||||
DispatchEx *prototype;
|
||||
jsdisp_t *prototype;
|
||||
|
||||
const builtin_info_t *builtin_info;
|
||||
};
|
||||
|
||||
#define _IDispatchEx_(x) ((IDispatchEx*) &(x)->lpIDispatchExVtbl)
|
||||
|
||||
static inline void jsdisp_release(DispatchEx *jsdisp)
|
||||
static inline void jsdisp_release(jsdisp_t *jsdisp)
|
||||
{
|
||||
IDispatchEx_Release(_IDispatchEx_(jsdisp));
|
||||
}
|
||||
|
||||
HRESULT create_dispex(script_ctx_t*,const builtin_info_t*,DispatchEx*,DispatchEx**);
|
||||
HRESULT init_dispex(DispatchEx*,script_ctx_t*,const builtin_info_t*,DispatchEx*);
|
||||
HRESULT init_dispex_from_constr(DispatchEx*,script_ctx_t*,const builtin_info_t*,DispatchEx*);
|
||||
HRESULT create_dispex(script_ctx_t*,const builtin_info_t*,jsdisp_t*,jsdisp_t**);
|
||||
HRESULT init_dispex(jsdisp_t*,script_ctx_t*,const builtin_info_t*,jsdisp_t*);
|
||||
HRESULT init_dispex_from_constr(jsdisp_t*,script_ctx_t*,const builtin_info_t*,jsdisp_t*);
|
||||
|
||||
HRESULT disp_call(script_ctx_t*,IDispatch*,DISPID,WORD,DISPPARAMS*,VARIANT*,jsexcept_t*,IServiceProvider*);
|
||||
HRESULT jsdisp_call_value(DispatchEx*,WORD,DISPPARAMS*,VARIANT*,jsexcept_t*,IServiceProvider*);
|
||||
HRESULT jsdisp_call(DispatchEx*,DISPID,WORD,DISPPARAMS*,VARIANT*,jsexcept_t*,IServiceProvider*);
|
||||
HRESULT jsdisp_call_name(DispatchEx*,const WCHAR*,WORD,DISPPARAMS*,VARIANT*,jsexcept_t*,IServiceProvider*);
|
||||
HRESULT jsdisp_call_value(jsdisp_t*,WORD,DISPPARAMS*,VARIANT*,jsexcept_t*,IServiceProvider*);
|
||||
HRESULT jsdisp_call(jsdisp_t*,DISPID,WORD,DISPPARAMS*,VARIANT*,jsexcept_t*,IServiceProvider*);
|
||||
HRESULT jsdisp_call_name(jsdisp_t*,const WCHAR*,WORD,DISPPARAMS*,VARIANT*,jsexcept_t*,IServiceProvider*);
|
||||
HRESULT disp_propget(script_ctx_t*,IDispatch*,DISPID,VARIANT*,jsexcept_t*,IServiceProvider*);
|
||||
HRESULT disp_propput(script_ctx_t*,IDispatch*,DISPID,VARIANT*,jsexcept_t*,IServiceProvider*);
|
||||
HRESULT jsdisp_propget(DispatchEx*,DISPID,VARIANT*,jsexcept_t*,IServiceProvider*);
|
||||
HRESULT jsdisp_propput_name(DispatchEx*,const WCHAR*,VARIANT*,jsexcept_t*,IServiceProvider*);
|
||||
HRESULT jsdisp_propput_const(DispatchEx*,const WCHAR*,VARIANT*);
|
||||
HRESULT jsdisp_propput_idx(DispatchEx*,DWORD,VARIANT*,jsexcept_t*,IServiceProvider*);
|
||||
HRESULT jsdisp_propget_name(DispatchEx*,LPCWSTR,VARIANT*,jsexcept_t*,IServiceProvider*);
|
||||
HRESULT jsdisp_get_idx(DispatchEx*,DWORD,VARIANT*,jsexcept_t*,IServiceProvider*);
|
||||
HRESULT jsdisp_get_id(DispatchEx*,const WCHAR*,DWORD,DISPID*);
|
||||
HRESULT jsdisp_delete_idx(DispatchEx*,DWORD);
|
||||
HRESULT jsdisp_propget(jsdisp_t*,DISPID,VARIANT*,jsexcept_t*,IServiceProvider*);
|
||||
HRESULT jsdisp_propput_name(jsdisp_t*,const WCHAR*,VARIANT*,jsexcept_t*,IServiceProvider*);
|
||||
HRESULT jsdisp_propput_const(jsdisp_t*,const WCHAR*,VARIANT*);
|
||||
HRESULT jsdisp_propput_idx(jsdisp_t*,DWORD,VARIANT*,jsexcept_t*,IServiceProvider*);
|
||||
HRESULT jsdisp_propget_name(jsdisp_t*,LPCWSTR,VARIANT*,jsexcept_t*,IServiceProvider*);
|
||||
HRESULT jsdisp_get_idx(jsdisp_t*,DWORD,VARIANT*,jsexcept_t*,IServiceProvider*);
|
||||
HRESULT jsdisp_get_id(jsdisp_t*,const WCHAR*,DWORD,DISPID*);
|
||||
HRESULT jsdisp_delete_idx(jsdisp_t*,DWORD);
|
||||
|
||||
HRESULT create_builtin_function(script_ctx_t*,builtin_invoke_t,const WCHAR*,const builtin_info_t*,DWORD,
|
||||
DispatchEx*,DispatchEx**);
|
||||
jsdisp_t*,jsdisp_t**);
|
||||
HRESULT Function_value(script_ctx_t*,vdisp_t*,WORD,DISPPARAMS*,VARIANT*,jsexcept_t*,IServiceProvider*);
|
||||
|
||||
HRESULT throw_eval_error(script_ctx_t*,jsexcept_t*,UINT,const WCHAR*);
|
||||
|
@ -224,14 +224,14 @@ HRESULT throw_syntax_error(script_ctx_t*,jsexcept_t*,UINT,const WCHAR*);
|
|||
HRESULT throw_type_error(script_ctx_t*,jsexcept_t*,UINT,const WCHAR*);
|
||||
HRESULT throw_uri_error(script_ctx_t*,jsexcept_t*,UINT,const WCHAR*);
|
||||
|
||||
HRESULT create_object(script_ctx_t*,DispatchEx*,DispatchEx**);
|
||||
HRESULT create_math(script_ctx_t*,DispatchEx**);
|
||||
HRESULT create_array(script_ctx_t*,DWORD,DispatchEx**);
|
||||
HRESULT create_regexp(script_ctx_t*,const WCHAR *,int,DWORD,DispatchEx**);
|
||||
HRESULT create_regexp_var(script_ctx_t*,VARIANT*,VARIANT*,DispatchEx**);
|
||||
HRESULT create_string(script_ctx_t*,const WCHAR*,DWORD,DispatchEx**);
|
||||
HRESULT create_bool(script_ctx_t*,VARIANT_BOOL,DispatchEx**);
|
||||
HRESULT create_number(script_ctx_t*,VARIANT*,DispatchEx**);
|
||||
HRESULT create_object(script_ctx_t*,jsdisp_t*,jsdisp_t**);
|
||||
HRESULT create_math(script_ctx_t*,jsdisp_t**);
|
||||
HRESULT create_array(script_ctx_t*,DWORD,jsdisp_t**);
|
||||
HRESULT create_regexp(script_ctx_t*,const WCHAR *,int,DWORD,jsdisp_t**);
|
||||
HRESULT create_regexp_var(script_ctx_t*,VARIANT*,VARIANT*,jsdisp_t**);
|
||||
HRESULT create_string(script_ctx_t*,const WCHAR*,DWORD,jsdisp_t**);
|
||||
HRESULT create_bool(script_ctx_t*,VARIANT_BOOL,jsdisp_t**);
|
||||
HRESULT create_number(script_ctx_t*,VARIANT*,jsdisp_t**);
|
||||
|
||||
typedef enum {
|
||||
NO_HINT,
|
||||
|
@ -276,24 +276,24 @@ struct _script_ctx_t {
|
|||
DWORD last_match_index;
|
||||
DWORD last_match_length;
|
||||
|
||||
DispatchEx *global;
|
||||
DispatchEx *function_constr;
|
||||
DispatchEx *activex_constr;
|
||||
DispatchEx *array_constr;
|
||||
DispatchEx *bool_constr;
|
||||
DispatchEx *date_constr;
|
||||
DispatchEx *error_constr;
|
||||
DispatchEx *eval_error_constr;
|
||||
DispatchEx *range_error_constr;
|
||||
DispatchEx *reference_error_constr;
|
||||
DispatchEx *regexp_error_constr;
|
||||
DispatchEx *syntax_error_constr;
|
||||
DispatchEx *type_error_constr;
|
||||
DispatchEx *uri_error_constr;
|
||||
DispatchEx *number_constr;
|
||||
DispatchEx *object_constr;
|
||||
DispatchEx *regexp_constr;
|
||||
DispatchEx *string_constr;
|
||||
jsdisp_t *global;
|
||||
jsdisp_t *function_constr;
|
||||
jsdisp_t *activex_constr;
|
||||
jsdisp_t *array_constr;
|
||||
jsdisp_t *bool_constr;
|
||||
jsdisp_t *date_constr;
|
||||
jsdisp_t *error_constr;
|
||||
jsdisp_t *eval_error_constr;
|
||||
jsdisp_t *range_error_constr;
|
||||
jsdisp_t *reference_error_constr;
|
||||
jsdisp_t *regexp_error_constr;
|
||||
jsdisp_t *syntax_error_constr;
|
||||
jsdisp_t *type_error_constr;
|
||||
jsdisp_t *uri_error_constr;
|
||||
jsdisp_t *number_constr;
|
||||
jsdisp_t *object_constr;
|
||||
jsdisp_t *regexp_constr;
|
||||
jsdisp_t *string_constr;
|
||||
};
|
||||
|
||||
void script_release(script_ctx_t*);
|
||||
|
@ -304,18 +304,18 @@ static inline void script_addref(script_ctx_t *ctx)
|
|||
}
|
||||
|
||||
HRESULT init_global(script_ctx_t*);
|
||||
HRESULT init_function_constr(script_ctx_t*,DispatchEx*);
|
||||
HRESULT create_object_prototype(script_ctx_t*,DispatchEx**);
|
||||
HRESULT init_function_constr(script_ctx_t*,jsdisp_t*);
|
||||
HRESULT create_object_prototype(script_ctx_t*,jsdisp_t**);
|
||||
|
||||
HRESULT create_activex_constr(script_ctx_t*,DispatchEx**);
|
||||
HRESULT create_array_constr(script_ctx_t*,DispatchEx*,DispatchEx**);
|
||||
HRESULT create_bool_constr(script_ctx_t*,DispatchEx*,DispatchEx**);
|
||||
HRESULT create_date_constr(script_ctx_t*,DispatchEx*,DispatchEx**);
|
||||
HRESULT init_error_constr(script_ctx_t*,DispatchEx*);
|
||||
HRESULT create_number_constr(script_ctx_t*,DispatchEx*,DispatchEx**);
|
||||
HRESULT create_object_constr(script_ctx_t*,DispatchEx*,DispatchEx**);
|
||||
HRESULT create_regexp_constr(script_ctx_t*,DispatchEx*,DispatchEx**);
|
||||
HRESULT create_string_constr(script_ctx_t*,DispatchEx*,DispatchEx**);
|
||||
HRESULT create_activex_constr(script_ctx_t*,jsdisp_t**);
|
||||
HRESULT create_array_constr(script_ctx_t*,jsdisp_t*,jsdisp_t**);
|
||||
HRESULT create_bool_constr(script_ctx_t*,jsdisp_t*,jsdisp_t**);
|
||||
HRESULT create_date_constr(script_ctx_t*,jsdisp_t*,jsdisp_t**);
|
||||
HRESULT init_error_constr(script_ctx_t*,jsdisp_t*);
|
||||
HRESULT create_number_constr(script_ctx_t*,jsdisp_t*,jsdisp_t**);
|
||||
HRESULT create_object_constr(script_ctx_t*,jsdisp_t*,jsdisp_t**);
|
||||
HRESULT create_regexp_constr(script_ctx_t*,jsdisp_t*,jsdisp_t**);
|
||||
HRESULT create_string_constr(script_ctx_t*,jsdisp_t*,jsdisp_t**);
|
||||
|
||||
IUnknown *create_ax_site(script_ctx_t*);
|
||||
|
||||
|
@ -327,11 +327,11 @@ typedef struct {
|
|||
#define REM_CHECK_GLOBAL 0x0001
|
||||
#define REM_RESET_INDEX 0x0002
|
||||
#define REM_NO_CTX_UPDATE 0x0004
|
||||
HRESULT regexp_match_next(script_ctx_t*,DispatchEx*,DWORD,const WCHAR*,DWORD,const WCHAR**,match_result_t**,
|
||||
HRESULT regexp_match_next(script_ctx_t*,jsdisp_t*,DWORD,const WCHAR*,DWORD,const WCHAR**,match_result_t**,
|
||||
DWORD*,DWORD*,match_result_t*);
|
||||
HRESULT regexp_match(script_ctx_t*,DispatchEx*,const WCHAR*,DWORD,BOOL,match_result_t**,DWORD*);
|
||||
HRESULT regexp_match(script_ctx_t*,jsdisp_t*,const WCHAR*,DWORD,BOOL,match_result_t**,DWORD*);
|
||||
HRESULT parse_regexp_flags(const WCHAR*,DWORD,DWORD*);
|
||||
HRESULT regexp_string_match(script_ctx_t*,DispatchEx*,BSTR,VARIANT*,jsexcept_t*);
|
||||
HRESULT regexp_string_match(script_ctx_t*,jsdisp_t*,BSTR,VARIANT*,jsexcept_t*);
|
||||
|
||||
static inline VARIANT *get_arg(DISPPARAMS *dp, DWORD i)
|
||||
{
|
||||
|
@ -343,7 +343,7 @@ static inline DWORD arg_cnt(const DISPPARAMS *dp)
|
|||
return dp->cArgs - dp->cNamedArgs;
|
||||
}
|
||||
|
||||
static inline BOOL is_class(DispatchEx *jsdisp, jsclass_t class)
|
||||
static inline BOOL is_class(jsdisp_t *jsdisp, jsclass_t class)
|
||||
{
|
||||
return jsdisp->builtin_info->class == class;
|
||||
}
|
||||
|
|
|
@ -193,7 +193,7 @@ HRESULT to_primitive(script_ctx_t *ctx, VARIANT *v, jsexcept_t *ei, VARIANT *ret
|
|||
V_BSTR(ret) = SysAllocString(V_BSTR(v));
|
||||
break;
|
||||
case VT_DISPATCH: {
|
||||
DispatchEx *jsdisp;
|
||||
jsdisp_t *jsdisp;
|
||||
DISPID id;
|
||||
DISPPARAMS dp = {NULL, NULL, 0, 0};
|
||||
HRESULT hres;
|
||||
|
@ -593,7 +593,7 @@ HRESULT to_string(script_ctx_t *ctx, VARIANT *v, jsexcept_t *ei, BSTR *str)
|
|||
/* ECMA-262 3rd Edition 9.9 */
|
||||
HRESULT to_object(script_ctx_t *ctx, VARIANT *v, IDispatch **disp)
|
||||
{
|
||||
DispatchEx *dispex;
|
||||
jsdisp_t *dispex;
|
||||
HRESULT hres;
|
||||
|
||||
switch(V_VT(v)) {
|
||||
|
@ -617,7 +617,7 @@ HRESULT to_object(script_ctx_t *ctx, VARIANT *v, IDispatch **disp)
|
|||
IDispatch_AddRef(V_DISPATCH(v));
|
||||
*disp = V_DISPATCH(v);
|
||||
}else {
|
||||
DispatchEx *obj;
|
||||
jsdisp_t *obj;
|
||||
|
||||
hres = create_object(ctx, NULL, &obj);
|
||||
if(FAILED(hres))
|
||||
|
|
|
@ -517,9 +517,9 @@ static const builtin_info_t Math_info = {
|
|||
NULL
|
||||
};
|
||||
|
||||
HRESULT create_math(script_ctx_t *ctx, DispatchEx **ret)
|
||||
HRESULT create_math(script_ctx_t *ctx, jsdisp_t **ret)
|
||||
{
|
||||
DispatchEx *math;
|
||||
jsdisp_t *math;
|
||||
unsigned i;
|
||||
VARIANT v;
|
||||
HRESULT hres;
|
||||
|
@ -538,7 +538,7 @@ HRESULT create_math(script_ctx_t *ctx, DispatchEx **ret)
|
|||
{SQRT2W, M_SQRT2}, /* ECMA-262 3rd Edition 15.8.1.8 */
|
||||
};
|
||||
|
||||
math = heap_alloc_zero(sizeof(DispatchEx));
|
||||
math = heap_alloc_zero(sizeof(jsdisp_t));
|
||||
if(!math)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
WINE_DEFAULT_DEBUG_CHANNEL(jscript);
|
||||
|
||||
typedef struct {
|
||||
DispatchEx dispex;
|
||||
jsdisp_t dispex;
|
||||
|
||||
VARIANT num;
|
||||
} NumberInstance;
|
||||
|
@ -287,7 +287,7 @@ static HRESULT NumberConstr_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags
|
|||
break;
|
||||
|
||||
case DISPATCH_CONSTRUCT: {
|
||||
DispatchEx *obj;
|
||||
jsdisp_t *obj;
|
||||
|
||||
if(arg_cnt(dp)) {
|
||||
hres = to_number(ctx, get_arg(dp, 0), ei, &num);
|
||||
|
@ -314,7 +314,7 @@ static HRESULT NumberConstr_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT alloc_number(script_ctx_t *ctx, DispatchEx *object_prototype, NumberInstance **ret)
|
||||
static HRESULT alloc_number(script_ctx_t *ctx, jsdisp_t *object_prototype, NumberInstance **ret)
|
||||
{
|
||||
NumberInstance *number;
|
||||
HRESULT hres;
|
||||
|
@ -334,7 +334,7 @@ static HRESULT alloc_number(script_ctx_t *ctx, DispatchEx *object_prototype, Num
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT create_number_constr(script_ctx_t *ctx, DispatchEx *object_prototype, DispatchEx **ret)
|
||||
HRESULT create_number_constr(script_ctx_t *ctx, jsdisp_t *object_prototype, jsdisp_t **ret)
|
||||
{
|
||||
NumberInstance *number;
|
||||
HRESULT hres;
|
||||
|
@ -353,7 +353,7 @@ HRESULT create_number_constr(script_ctx_t *ctx, DispatchEx *object_prototype, Di
|
|||
return hres;
|
||||
}
|
||||
|
||||
HRESULT create_number(script_ctx_t *ctx, VARIANT *num, DispatchEx **ret)
|
||||
HRESULT create_number(script_ctx_t *ctx, VARIANT *num, jsdisp_t **ret)
|
||||
{
|
||||
NumberInstance *number;
|
||||
HRESULT hres;
|
||||
|
|
|
@ -35,7 +35,7 @@ static const WCHAR default_valueW[] = {'[','o','b','j','e','c','t',' ','O','b','
|
|||
static HRESULT Object_toString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISPPARAMS *dp,
|
||||
VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
|
||||
{
|
||||
DispatchEx *jsdisp;
|
||||
jsdisp_t *jsdisp;
|
||||
const WCHAR *str;
|
||||
|
||||
static const WCHAR formatW[] = {'[','o','b','j','e','c','t',' ','%','s',']',0};
|
||||
|
@ -151,7 +151,7 @@ static HRESULT Object_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISP
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static void Object_destructor(DispatchEx *dispex)
|
||||
static void Object_destructor(jsdisp_t *dispex)
|
||||
{
|
||||
heap_free(dispex);
|
||||
}
|
||||
|
@ -204,7 +204,7 @@ static HRESULT ObjectConstr_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags
|
|||
}
|
||||
/* fall through */
|
||||
case DISPATCH_CONSTRUCT: {
|
||||
DispatchEx *obj;
|
||||
jsdisp_t *obj;
|
||||
|
||||
hres = create_object(ctx, NULL, &obj);
|
||||
if(FAILED(hres))
|
||||
|
@ -223,7 +223,7 @@ static HRESULT ObjectConstr_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT create_object_constr(script_ctx_t *ctx, DispatchEx *object_prototype, DispatchEx **ret)
|
||||
HRESULT create_object_constr(script_ctx_t *ctx, jsdisp_t *object_prototype, jsdisp_t **ret)
|
||||
{
|
||||
static const WCHAR ObjectW[] = {'O','b','j','e','c','t',0};
|
||||
|
||||
|
@ -231,17 +231,17 @@ HRESULT create_object_constr(script_ctx_t *ctx, DispatchEx *object_prototype, Di
|
|||
object_prototype, ret);
|
||||
}
|
||||
|
||||
HRESULT create_object_prototype(script_ctx_t *ctx, DispatchEx **ret)
|
||||
HRESULT create_object_prototype(script_ctx_t *ctx, jsdisp_t **ret)
|
||||
{
|
||||
return create_dispex(ctx, &Object_info, NULL, ret);
|
||||
}
|
||||
|
||||
HRESULT create_object(script_ctx_t *ctx, DispatchEx *constr, DispatchEx **ret)
|
||||
HRESULT create_object(script_ctx_t *ctx, jsdisp_t *constr, jsdisp_t **ret)
|
||||
{
|
||||
DispatchEx *object;
|
||||
jsdisp_t *object;
|
||||
HRESULT hres;
|
||||
|
||||
object = heap_alloc_zero(sizeof(DispatchEx));
|
||||
object = heap_alloc_zero(sizeof(jsdisp_t));
|
||||
if(!object)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ typedef struct {
|
|||
} JSRegExp;
|
||||
|
||||
typedef struct {
|
||||
DispatchEx dispex;
|
||||
jsdisp_t dispex;
|
||||
|
||||
JSRegExp *jsregexp;
|
||||
BSTR str;
|
||||
|
@ -3404,7 +3404,7 @@ static HRESULT do_regexp_match_next(script_ctx_t *ctx, RegExpInstance *regexp, D
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT regexp_match_next(script_ctx_t *ctx, DispatchEx *dispex, DWORD rem_flags, const WCHAR *str,
|
||||
HRESULT regexp_match_next(script_ctx_t *ctx, jsdisp_t *dispex, DWORD rem_flags, const WCHAR *str,
|
||||
DWORD len, const WCHAR **cp, match_result_t **parens, DWORD *parens_size, DWORD *parens_cnt,
|
||||
match_result_t *ret)
|
||||
{
|
||||
|
@ -3423,7 +3423,7 @@ HRESULT regexp_match_next(script_ctx_t *ctx, DispatchEx *dispex, DWORD rem_flags
|
|||
return hres;
|
||||
}
|
||||
|
||||
HRESULT regexp_match(script_ctx_t *ctx, DispatchEx *dispex, const WCHAR *str, DWORD len, BOOL gflag,
|
||||
HRESULT regexp_match(script_ctx_t *ctx, jsdisp_t *dispex, const WCHAR *str, DWORD len, BOOL gflag,
|
||||
match_result_t **match_result, DWORD *result_cnt)
|
||||
{
|
||||
RegExpInstance *This = (RegExpInstance*)dispex;
|
||||
|
@ -3583,7 +3583,7 @@ static HRESULT RegExp_toString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, D
|
|||
static HRESULT create_match_array(script_ctx_t *ctx, BSTR input, const match_result_t *result,
|
||||
const match_result_t *parens, DWORD parens_cnt, jsexcept_t *ei, IDispatch **ret)
|
||||
{
|
||||
DispatchEx *array;
|
||||
jsdisp_t *array;
|
||||
VARIANT var;
|
||||
int i;
|
||||
HRESULT hres = S_OK;
|
||||
|
@ -3781,7 +3781,7 @@ static HRESULT RegExp_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISP
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static void RegExp_destructor(DispatchEx *dispex)
|
||||
static void RegExp_destructor(jsdisp_t *dispex)
|
||||
{
|
||||
RegExpInstance *This = (RegExpInstance*)dispex;
|
||||
|
||||
|
@ -3812,7 +3812,7 @@ static const builtin_info_t RegExp_info = {
|
|||
NULL
|
||||
};
|
||||
|
||||
static HRESULT alloc_regexp(script_ctx_t *ctx, DispatchEx *object_prototype, RegExpInstance **ret)
|
||||
static HRESULT alloc_regexp(script_ctx_t *ctx, jsdisp_t *object_prototype, RegExpInstance **ret)
|
||||
{
|
||||
RegExpInstance *regexp;
|
||||
HRESULT hres;
|
||||
|
@ -3835,7 +3835,7 @@ static HRESULT alloc_regexp(script_ctx_t *ctx, DispatchEx *object_prototype, Reg
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT create_regexp(script_ctx_t *ctx, const WCHAR *exp, int len, DWORD flags, DispatchEx **ret)
|
||||
HRESULT create_regexp(script_ctx_t *ctx, const WCHAR *exp, int len, DWORD flags, jsdisp_t **ret)
|
||||
{
|
||||
RegExpInstance *regexp;
|
||||
HRESULT hres;
|
||||
|
@ -3869,14 +3869,14 @@ HRESULT create_regexp(script_ctx_t *ctx, const WCHAR *exp, int len, DWORD flags,
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT create_regexp_var(script_ctx_t *ctx, VARIANT *src_arg, VARIANT *flags_arg, DispatchEx **ret)
|
||||
HRESULT create_regexp_var(script_ctx_t *ctx, VARIANT *src_arg, VARIANT *flags_arg, jsdisp_t **ret)
|
||||
{
|
||||
const WCHAR *opt = emptyW, *src;
|
||||
DWORD flags;
|
||||
HRESULT hres;
|
||||
|
||||
if(V_VT(src_arg) == VT_DISPATCH) {
|
||||
DispatchEx *obj;
|
||||
jsdisp_t *obj;
|
||||
|
||||
obj = iface_to_jsdisp((IUnknown*)V_DISPATCH(src_arg));
|
||||
if(obj) {
|
||||
|
@ -3915,13 +3915,13 @@ HRESULT create_regexp_var(script_ctx_t *ctx, VARIANT *src_arg, VARIANT *flags_ar
|
|||
return create_regexp(ctx, src, -1, flags, ret);
|
||||
}
|
||||
|
||||
HRESULT regexp_string_match(script_ctx_t *ctx, DispatchEx *re, BSTR str,
|
||||
HRESULT regexp_string_match(script_ctx_t *ctx, jsdisp_t *re, BSTR str,
|
||||
VARIANT *retv, jsexcept_t *ei)
|
||||
{
|
||||
RegExpInstance *regexp = (RegExpInstance*)re;
|
||||
match_result_t *match_result;
|
||||
DWORD match_cnt, i, length;
|
||||
DispatchEx *array;
|
||||
jsdisp_t *array;
|
||||
VARIANT var;
|
||||
HRESULT hres;
|
||||
|
||||
|
@ -4058,7 +4058,7 @@ static HRESULT RegExpConstr_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags
|
|||
if(arg_cnt(dp)) {
|
||||
VARIANT *arg = get_arg(dp,0);
|
||||
if(V_VT(arg) == VT_DISPATCH) {
|
||||
DispatchEx *jsdisp = iface_to_jsdisp((IUnknown*)V_DISPATCH(arg));
|
||||
jsdisp_t *jsdisp = iface_to_jsdisp((IUnknown*)V_DISPATCH(arg));
|
||||
if(jsdisp) {
|
||||
if(is_class(jsdisp, JSCLASS_REGEXP)) {
|
||||
if(arg_cnt(dp) > 1 && V_VT(get_arg(dp,1)) != VT_EMPTY) {
|
||||
|
@ -4080,7 +4080,7 @@ static HRESULT RegExpConstr_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags
|
|||
}
|
||||
/* fall through */
|
||||
case DISPATCH_CONSTRUCT: {
|
||||
DispatchEx *ret;
|
||||
jsdisp_t *ret;
|
||||
HRESULT hres;
|
||||
|
||||
if(!arg_cnt(dp)) {
|
||||
|
@ -4122,7 +4122,7 @@ static const builtin_info_t RegExpConstr_info = {
|
|||
NULL
|
||||
};
|
||||
|
||||
HRESULT create_regexp_constr(script_ctx_t *ctx, DispatchEx *object_prototype, DispatchEx **ret)
|
||||
HRESULT create_regexp_constr(script_ctx_t *ctx, jsdisp_t *object_prototype, jsdisp_t **ret)
|
||||
{
|
||||
RegExpInstance *regexp;
|
||||
HRESULT hres;
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
WINE_DEFAULT_DEBUG_CHANNEL(jscript);
|
||||
|
||||
typedef struct {
|
||||
DispatchEx dispex;
|
||||
jsdisp_t dispex;
|
||||
|
||||
WCHAR *str;
|
||||
DWORD length;
|
||||
|
@ -622,7 +622,7 @@ static HRESULT String_match(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISP
|
|||
VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
|
||||
{
|
||||
const WCHAR *str;
|
||||
DispatchEx *regexp;
|
||||
jsdisp_t *regexp;
|
||||
VARIANT *arg_var;
|
||||
DWORD length;
|
||||
BSTR val_str = NULL;
|
||||
|
@ -710,7 +710,7 @@ static HRESULT strbuf_append(strbuf_t *buf, const WCHAR *str, DWORD len)
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT rep_call(script_ctx_t *ctx, DispatchEx *func, const WCHAR *str, match_result_t *match,
|
||||
static HRESULT rep_call(script_ctx_t *ctx, jsdisp_t *func, const WCHAR *str, match_result_t *match,
|
||||
match_result_t *parens, DWORD parens_cnt, BSTR *ret, jsexcept_t *ei, IServiceProvider *caller)
|
||||
{
|
||||
DISPPARAMS dp = {NULL, NULL, 0, 0};
|
||||
|
@ -778,7 +778,7 @@ static HRESULT String_replace(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DI
|
|||
const WCHAR *str;
|
||||
DWORD parens_cnt = 0, parens_size=0, rep_len=0, length;
|
||||
BSTR rep_str = NULL, match_str = NULL, ret_str, val_str;
|
||||
DispatchEx *rep_func = NULL, *regexp = NULL;
|
||||
jsdisp_t *rep_func = NULL, *regexp = NULL;
|
||||
match_result_t *parens = NULL, match = {NULL,0}, **parens_ptr = &parens;
|
||||
strbuf_t ret = {NULL,0,0};
|
||||
DWORD re_flags = REM_NO_CTX_UPDATE;
|
||||
|
@ -1008,7 +1008,7 @@ static HRESULT String_replace(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DI
|
|||
static HRESULT String_search(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISPPARAMS *dp,
|
||||
VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
|
||||
{
|
||||
DispatchEx *regexp = NULL;
|
||||
jsdisp_t *regexp = NULL;
|
||||
const WCHAR *str, *cp;
|
||||
match_result_t match;
|
||||
VARIANT *arg;
|
||||
|
@ -1158,7 +1158,7 @@ static HRESULT String_split(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISP
|
|||
const WCHAR *str, *ptr, *ptr2;
|
||||
BOOL use_regexp = FALSE;
|
||||
VARIANT *arg, var;
|
||||
DispatchEx *array;
|
||||
jsdisp_t *array;
|
||||
BSTR val_str, match_str = NULL;
|
||||
HRESULT hres;
|
||||
|
||||
|
@ -1176,7 +1176,7 @@ static HRESULT String_split(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISP
|
|||
arg = get_arg(dp, 0);
|
||||
switch(V_VT(arg)) {
|
||||
case VT_DISPATCH: {
|
||||
DispatchEx *regexp;
|
||||
jsdisp_t *regexp;
|
||||
|
||||
regexp = iface_to_jsdisp((IUnknown*)V_DISPATCH(arg));
|
||||
if(regexp) {
|
||||
|
@ -1546,7 +1546,7 @@ static HRESULT String_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISP
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static void String_destructor(DispatchEx *dispex)
|
||||
static void String_destructor(jsdisp_t *dispex)
|
||||
{
|
||||
StringInstance *This = (StringInstance*)dispex;
|
||||
|
||||
|
@ -1656,7 +1656,7 @@ static HRESULT StringConstr_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags
|
|||
break;
|
||||
}
|
||||
case DISPATCH_CONSTRUCT: {
|
||||
DispatchEx *ret;
|
||||
jsdisp_t *ret;
|
||||
|
||||
if(arg_cnt(dp)) {
|
||||
BSTR str;
|
||||
|
@ -1687,7 +1687,7 @@ static HRESULT StringConstr_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT string_alloc(script_ctx_t *ctx, DispatchEx *object_prototype, StringInstance **ret)
|
||||
static HRESULT string_alloc(script_ctx_t *ctx, jsdisp_t *object_prototype, StringInstance **ret)
|
||||
{
|
||||
StringInstance *string;
|
||||
HRESULT hres;
|
||||
|
@ -1722,7 +1722,7 @@ static const builtin_info_t StringConstr_info = {
|
|||
NULL
|
||||
};
|
||||
|
||||
HRESULT create_string_constr(script_ctx_t *ctx, DispatchEx *object_prototype, DispatchEx **ret)
|
||||
HRESULT create_string_constr(script_ctx_t *ctx, jsdisp_t *object_prototype, jsdisp_t **ret)
|
||||
{
|
||||
StringInstance *string;
|
||||
HRESULT hres;
|
||||
|
@ -1740,7 +1740,7 @@ HRESULT create_string_constr(script_ctx_t *ctx, DispatchEx *object_prototype, Di
|
|||
return hres;
|
||||
}
|
||||
|
||||
HRESULT create_string(script_ctx_t *ctx, const WCHAR *str, DWORD len, DispatchEx **ret)
|
||||
HRESULT create_string(script_ctx_t *ctx, const WCHAR *str, DWORD len, jsdisp_t **ret)
|
||||
{
|
||||
StringInstance *string;
|
||||
HRESULT hres;
|
||||
|
|
Loading…
Reference in New Issue