jscript: Enable compilation with long types.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Eric Pouech 2022-02-11 08:41:11 +01:00 committed by Alexandre Julliard
parent 0b2fd91596
commit e8e0917a9c
13 changed files with 73 additions and 74 deletions

View File

@ -1,4 +1,3 @@
EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = jscript.dll MODULE = jscript.dll
IMPORTS = oleaut32 ole32 user32 advapi32 IMPORTS = oleaut32 ole32 user32 advapi32

View File

@ -156,7 +156,7 @@ static HRESULT ActiveXObject_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flag
if(ctx->safeopt != (INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER) if(ctx->safeopt != (INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER)
&& ctx->safeopt != INTERFACE_USES_DISPEX) { && ctx->safeopt != INTERFACE_USES_DISPEX) {
FIXME("Unsupported safeopt %x\n", ctx->safeopt); FIXME("Unsupported safeopt %lx\n", ctx->safeopt);
return E_NOTIMPL; return E_NOTIMPL;
} }

View File

@ -122,7 +122,7 @@ static HRESULT Array_set_length(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t val
DWORD i; DWORD i;
HRESULT hres; HRESULT hres;
TRACE("%p %d\n", This, This->length); TRACE("%p %ld\n", This, This->length);
hres = to_number(ctx, value, &len); hres = to_number(ctx, value, &len);
if(FAILED(hres)) if(FAILED(hres))
@ -701,7 +701,7 @@ static HRESULT Array_sort(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, unsigne
vtab[i] = jsval_undefined(); vtab[i] = jsval_undefined();
hres = S_OK; hres = S_OK;
} else if(FAILED(hres)) { } else if(FAILED(hres)) {
WARN("Could not get elem %d: %08x\n", i, hres); WARN("Could not get elem %ld: %08lx\n", i, hres);
break; break;
} }
} }

View File

@ -346,7 +346,7 @@ static HRESULT ensure_prop_name(jsdisp_t *This, const WCHAR *name, DWORD create_
hres = find_prop_name_prot(This, string_hash(name), name, &prop); hres = find_prop_name_prot(This, string_hash(name), name, &prop);
if(SUCCEEDED(hres) && (!prop || prop->type == PROP_DELETED)) { if(SUCCEEDED(hres) && (!prop || prop->type == PROP_DELETED)) {
TRACE("creating prop %s flags %x\n", debugstr_w(name), create_flags); TRACE("creating prop %s flags %lx\n", debugstr_w(name), create_flags);
if(prop) { if(prop) {
prop->type = PROP_JSVAL; prop->type = PROP_JSVAL;
@ -467,7 +467,7 @@ static HRESULT prop_get(jsdisp_t *This, dispex_prop_t *prop, jsval_t *r)
} }
if(FAILED(hres)) { if(FAILED(hres)) {
TRACE("fail %08x\n", hres); TRACE("fail %08lx\n", hres);
return hres; return hres;
} }
@ -738,7 +738,7 @@ static ULONG WINAPI ScriptTypeInfo_AddRef(ITypeInfo *iface)
ScriptTypeInfo *This = ScriptTypeInfo_from_ITypeInfo(iface); ScriptTypeInfo *This = ScriptTypeInfo_from_ITypeInfo(iface);
LONG ref = InterlockedIncrement(&This->ref); LONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p) ref=%d\n", This, ref); TRACE("(%p) ref=%ld\n", This, ref);
return ref; return ref;
} }
@ -749,7 +749,7 @@ static ULONG WINAPI ScriptTypeInfo_Release(ITypeInfo *iface)
LONG ref = InterlockedDecrement(&This->ref); LONG ref = InterlockedDecrement(&This->ref);
UINT i; UINT i;
TRACE("(%p) ref=%d\n", This, ref); TRACE("(%p) ref=%ld\n", This, ref);
if (!ref) if (!ref)
{ {
@ -870,7 +870,7 @@ static HRESULT WINAPI ScriptTypeInfo_GetNames(ITypeInfo *iface, MEMBERID memid,
HRESULT hr; HRESULT hr;
UINT i = 0; UINT i = 0;
TRACE("(%p)->(%d %p %u %p)\n", This, memid, rgBstrNames, cMaxNames, pcNames); TRACE("(%p)->(%ld %p %u %p)\n", This, memid, rgBstrNames, cMaxNames, pcNames);
if (!rgBstrNames || !pcNames) return E_INVALIDARG; if (!rgBstrNames || !pcNames) return E_INVALIDARG;
if (memid <= 0) return TYPE_E_ELEMENTNOTFOUND; if (memid <= 0) return TYPE_E_ELEMENTNOTFOUND;
@ -1001,7 +1001,7 @@ static HRESULT WINAPI ScriptTypeInfo_Invoke(ITypeInfo *iface, PVOID pvInstance,
IDispatch *disp; IDispatch *disp;
HRESULT hr; HRESULT hr;
TRACE("(%p)->(%p %d %d %p %p %p %p)\n", This, pvInstance, memid, wFlags, TRACE("(%p)->(%p %ld %d %p %p %p %p)\n", This, pvInstance, memid, wFlags,
pDispParams, pVarResult, pExcepInfo, puArgErr); pDispParams, pVarResult, pExcepInfo, puArgErr);
if (!pvInstance) return E_INVALIDARG; if (!pvInstance) return E_INVALIDARG;
@ -1035,7 +1035,7 @@ static HRESULT WINAPI ScriptTypeInfo_GetDocumentation(ITypeInfo *iface, MEMBERID
dispex_prop_t *var; dispex_prop_t *var;
HRESULT hr; HRESULT hr;
TRACE("(%p)->(%d %p %p %p %p)\n", This, memid, pBstrName, pBstrDocString, pdwHelpContext, pBstrHelpFile); TRACE("(%p)->(%ld %p %p %p %p)\n", This, memid, pBstrName, pBstrDocString, pdwHelpContext, pBstrHelpFile);
if (pBstrDocString) *pBstrDocString = NULL; if (pBstrDocString) *pBstrDocString = NULL;
if (pdwHelpContext) *pdwHelpContext = 0; if (pdwHelpContext) *pdwHelpContext = 0;
@ -1086,7 +1086,7 @@ static HRESULT WINAPI ScriptTypeInfo_GetDllEntry(ITypeInfo *iface, MEMBERID memi
ITypeInfo *disp_typeinfo; ITypeInfo *disp_typeinfo;
HRESULT hr; HRESULT hr;
TRACE("(%p)->(%d %d %p %p %p)\n", This, memid, invKind, pBstrDllName, pBstrName, pwOrdinal); TRACE("(%p)->(%ld %d %p %p %p)\n", This, memid, invKind, pBstrDllName, pBstrName, pwOrdinal);
if (pBstrDllName) *pBstrDllName = NULL; if (pBstrDllName) *pBstrDllName = NULL;
if (pBstrName) *pBstrName = NULL; if (pBstrName) *pBstrName = NULL;
@ -1107,7 +1107,7 @@ static HRESULT WINAPI ScriptTypeInfo_GetRefTypeInfo(ITypeInfo *iface, HREFTYPE h
ScriptTypeInfo *This = ScriptTypeInfo_from_ITypeInfo(iface); ScriptTypeInfo *This = ScriptTypeInfo_from_ITypeInfo(iface);
HRESULT hr; HRESULT hr;
TRACE("(%p)->(%x %p)\n", This, hRefType, ppTInfo); TRACE("(%p)->(%lx %p)\n", This, hRefType, ppTInfo);
if (!ppTInfo || (INT)hRefType < 0) return E_INVALIDARG; if (!ppTInfo || (INT)hRefType < 0) return E_INVALIDARG;
@ -1130,7 +1130,7 @@ static HRESULT WINAPI ScriptTypeInfo_AddressOfMember(ITypeInfo *iface, MEMBERID
ITypeInfo *disp_typeinfo; ITypeInfo *disp_typeinfo;
HRESULT hr; HRESULT hr;
TRACE("(%p)->(%d %d %p)\n", This, memid, invKind, ppv); TRACE("(%p)->(%ld %d %p)\n", This, memid, invKind, ppv);
if (!ppv) return E_INVALIDARG; if (!ppv) return E_INVALIDARG;
*ppv = NULL; *ppv = NULL;
@ -1163,7 +1163,7 @@ static HRESULT WINAPI ScriptTypeInfo_GetMops(ITypeInfo *iface, MEMBERID memid, B
ITypeInfo *disp_typeinfo; ITypeInfo *disp_typeinfo;
HRESULT hr; HRESULT hr;
TRACE("(%p)->(%d %p)\n", This, memid, pBstrMops); TRACE("(%p)->(%ld %p)\n", This, memid, pBstrMops);
if (!pBstrMops) return E_INVALIDARG; if (!pBstrMops) return E_INVALIDARG;
@ -1268,7 +1268,7 @@ static HRESULT WINAPI ScriptTypeComp_Bind(ITypeComp *iface, LPOLESTR szName, ULO
HRESULT hr; HRESULT hr;
UINT i; UINT i;
TRACE("(%p)->(%s %08x %d %p %p %p)\n", This, debugstr_w(szName), lHashVal, TRACE("(%p)->(%s %08lx %d %p %p %p)\n", This, debugstr_w(szName), lHashVal,
wFlags, ppTInfo, pDescKind, pBindPtr); wFlags, ppTInfo, pDescKind, pBindPtr);
if (!szName || !ppTInfo || !pDescKind || !pBindPtr) if (!szName || !ppTInfo || !pDescKind || !pBindPtr)
@ -1322,7 +1322,7 @@ static HRESULT WINAPI ScriptTypeComp_BindType(ITypeComp *iface, LPOLESTR szName,
ITypeComp *disp_typecomp; ITypeComp *disp_typecomp;
HRESULT hr; HRESULT hr;
TRACE("(%p)->(%s %08x %p %p)\n", This, debugstr_w(szName), lHashVal, ppTInfo, ppTComp); TRACE("(%p)->(%s %08lx %p %p)\n", This, debugstr_w(szName), lHashVal, ppTInfo, ppTComp);
if (!szName || !ppTInfo || !ppTComp) if (!szName || !ppTInfo || !ppTComp)
return E_INVALIDARG; return E_INVALIDARG;
@ -1386,7 +1386,7 @@ static ULONG WINAPI DispatchEx_Release(IDispatchEx *iface)
{ {
jsdisp_t *This = impl_from_IDispatchEx(iface); jsdisp_t *This = impl_from_IDispatchEx(iface);
ULONG ref = --This->ref; ULONG ref = --This->ref;
TRACE("(%p) ref=%d\n", This, ref); TRACE("(%p) ref=%ld\n", This, ref);
if(!ref) if(!ref)
jsdisp_free(This); jsdisp_free(This);
return ref; return ref;
@ -1413,7 +1413,7 @@ static HRESULT WINAPI DispatchEx_GetTypeInfo(IDispatchEx *iface, UINT iTInfo, LC
ScriptTypeInfo *typeinfo; ScriptTypeInfo *typeinfo;
unsigned pos; unsigned pos;
TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo); TRACE("(%p)->(%u %lu %p)\n", This, iTInfo, lcid, ppTInfo);
if (iTInfo != 0) return DISP_E_BADINDEX; if (iTInfo != 0) return DISP_E_BADINDEX;
@ -1508,7 +1508,7 @@ static HRESULT WINAPI DispatchEx_GetIDsOfNames(IDispatchEx *iface, REFIID riid,
UINT i; UINT i;
HRESULT hres; HRESULT hres;
TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames, TRACE("(%p)->(%s %p %u %lu %p)\n", This, debugstr_guid(riid), rgszNames, cNames,
lcid, rgDispId); lcid, rgDispId);
if(cNames == 0) if(cNames == 0)
@ -1534,7 +1534,7 @@ static HRESULT WINAPI DispatchEx_Invoke(IDispatchEx *iface, DISPID dispIdMember,
{ {
jsdisp_t *This = impl_from_IDispatchEx(iface); jsdisp_t *This = impl_from_IDispatchEx(iface);
TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid), TRACE("(%p)->(%ld %s %ld %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
return IDispatchEx_InvokeEx(&This->IDispatchEx_iface, dispIdMember, lcid, wFlags, return IDispatchEx_InvokeEx(&This->IDispatchEx_iface, dispIdMember, lcid, wFlags,
@ -1545,10 +1545,10 @@ static HRESULT WINAPI DispatchEx_GetDispID(IDispatchEx *iface, BSTR bstrName, DW
{ {
jsdisp_t *This = impl_from_IDispatchEx(iface); jsdisp_t *This = impl_from_IDispatchEx(iface);
TRACE("(%p)->(%s %x %p)\n", This, debugstr_w(bstrName), grfdex, pid); TRACE("(%p)->(%s %lx %p)\n", This, debugstr_w(bstrName), grfdex, pid);
if(grfdex & ~(fdexNameCaseSensitive|fdexNameEnsure|fdexNameImplicit|FDEX_VERSION_MASK)) { if(grfdex & ~(fdexNameCaseSensitive|fdexNameEnsure|fdexNameImplicit|FDEX_VERSION_MASK)) {
FIXME("Unsupported grfdex %x\n", grfdex); FIXME("Unsupported grfdex %lx\n", grfdex);
return E_NOTIMPL; return E_NOTIMPL;
} }
@ -1563,7 +1563,7 @@ static HRESULT WINAPI DispatchEx_InvokeEx(IDispatchEx *iface, DISPID id, LCID lc
jsexcept_t ei; jsexcept_t ei;
HRESULT hres; HRESULT hres;
TRACE("(%p)->(%x %x %x %p %p %p %p)\n", This, id, lcid, wFlags, pdp, pvarRes, pei, pspCaller); TRACE("(%p)->(%lx %lx %x %p %p %p %p)\n", This, id, lcid, wFlags, pdp, pvarRes, pei, pspCaller);
if(pvarRes) if(pvarRes)
V_VT(pvarRes) = VT_EMPTY; V_VT(pvarRes) = VT_EMPTY;
@ -1689,10 +1689,10 @@ static HRESULT WINAPI DispatchEx_DeleteMemberByName(IDispatchEx *iface, BSTR bst
BOOL b; BOOL b;
HRESULT hres; HRESULT hres;
TRACE("(%p)->(%s %x)\n", This, debugstr_w(bstrName), grfdex); TRACE("(%p)->(%s %lx)\n", This, debugstr_w(bstrName), grfdex);
if(grfdex & ~(fdexNameCaseSensitive|fdexNameEnsure|fdexNameImplicit|FDEX_VERSION_MASK)) if(grfdex & ~(fdexNameCaseSensitive|fdexNameEnsure|fdexNameImplicit|FDEX_VERSION_MASK))
FIXME("Unsupported grfdex %x\n", grfdex); FIXME("Unsupported grfdex %lx\n", grfdex);
hres = find_prop_name(This, string_hash(bstrName), bstrName, &prop); hres = find_prop_name(This, string_hash(bstrName), bstrName, &prop);
if(FAILED(hres)) if(FAILED(hres))
@ -1711,7 +1711,7 @@ static HRESULT WINAPI DispatchEx_DeleteMemberByDispID(IDispatchEx *iface, DISPID
dispex_prop_t *prop; dispex_prop_t *prop;
BOOL b; BOOL b;
TRACE("(%p)->(%x)\n", This, id); TRACE("(%p)->(%lx)\n", This, id);
prop = get_prop(This, id); prop = get_prop(This, id);
if(!prop) { if(!prop) {
@ -1725,7 +1725,7 @@ static HRESULT WINAPI DispatchEx_DeleteMemberByDispID(IDispatchEx *iface, DISPID
static HRESULT WINAPI DispatchEx_GetMemberProperties(IDispatchEx *iface, DISPID id, DWORD grfdexFetch, DWORD *pgrfdex) static HRESULT WINAPI DispatchEx_GetMemberProperties(IDispatchEx *iface, DISPID id, DWORD grfdexFetch, DWORD *pgrfdex)
{ {
jsdisp_t *This = impl_from_IDispatchEx(iface); jsdisp_t *This = impl_from_IDispatchEx(iface);
FIXME("(%p)->(%x %x %p)\n", This, id, grfdexFetch, pgrfdex); FIXME("(%p)->(%lx %lx %p)\n", This, id, grfdexFetch, pgrfdex);
return E_NOTIMPL; return E_NOTIMPL;
} }
@ -1734,7 +1734,7 @@ static HRESULT WINAPI DispatchEx_GetMemberName(IDispatchEx *iface, DISPID id, BS
jsdisp_t *This = impl_from_IDispatchEx(iface); jsdisp_t *This = impl_from_IDispatchEx(iface);
dispex_prop_t *prop; dispex_prop_t *prop;
TRACE("(%p)->(%x %p)\n", This, id, pbstrName); TRACE("(%p)->(%lx %p)\n", This, id, pbstrName);
prop = get_prop(This, id); prop = get_prop(This, id);
if(!prop) if(!prop)
@ -1752,7 +1752,7 @@ static HRESULT WINAPI DispatchEx_GetNextDispID(IDispatchEx *iface, DWORD grfdex,
jsdisp_t *This = impl_from_IDispatchEx(iface); jsdisp_t *This = impl_from_IDispatchEx(iface);
HRESULT hres = S_FALSE; HRESULT hres = S_FALSE;
TRACE("(%p)->(%x %x %p)\n", This, grfdex, id, pid); TRACE("(%p)->(%lx %lx %p)\n", This, grfdex, id, pid);
if(id != DISPID_VALUE) if(id != DISPID_VALUE)
hres = jsdisp_next_prop(This, id, JSDISP_ENUM_ALL, pid); hres = jsdisp_next_prop(This, id, JSDISP_ENUM_ALL, pid);
@ -2048,7 +2048,7 @@ static HRESULT disp_invoke(script_ctx_t *ctx, IDispatch *disp, DISPID id, WORD f
} }
if(hres == DISP_E_EXCEPTION) { if(hres == DISP_E_EXCEPTION) {
TRACE("DISP_E_EXCEPTION: %08x %s %s\n", ei.scode, debugstr_w(ei.bstrSource), debugstr_w(ei.bstrDescription)); TRACE("DISP_E_EXCEPTION: %08lx %s %s\n", ei.scode, debugstr_w(ei.bstrSource), debugstr_w(ei.bstrDescription));
reset_ei(ctx->ei); reset_ei(ctx->ei);
ctx->ei->error = (SUCCEEDED(ei.scode) || ei.scode == DISP_E_EXCEPTION) ? E_FAIL : ei.scode; ctx->ei->error = (SUCCEEDED(ei.scode) || ei.scode == DISP_E_EXCEPTION) ? E_FAIL : ei.scode;
if(ei.bstrSource) if(ei.bstrSource)
@ -2608,7 +2608,7 @@ HRESULT jsdisp_define_property(jsdisp_t *obj, const WCHAR *name, property_desc_t
return S_OK; return S_OK;
} }
TRACE("existing prop %s prop flags %x desc flags %x desc mask %x\n", debugstr_w(name), TRACE("existing prop %s prop flags %lx desc flags %x desc mask %x\n", debugstr_w(name),
prop->flags, desc->flags, desc->mask); prop->flags, desc->flags, desc->mask);
if(!(prop->flags & PROPF_CONFIGURABLE)) { if(!(prop->flags & PROPF_CONFIGURABLE)) {

View File

@ -837,7 +837,7 @@ static HRESULT interp_forin(script_ctx_t *ctx)
id = get_number(stack_top(ctx)); id = get_number(stack_top(ctx));
if(!stack_topn_exprval(ctx, 1, &prop_ref)) { if(!stack_topn_exprval(ctx, 1, &prop_ref)) {
FIXME("invalid ref: %08x\n", prop_ref.u.hres); FIXME("invalid ref: %08lx\n", prop_ref.u.hres);
return E_FAIL; return E_FAIL;
} }
@ -992,7 +992,7 @@ static HRESULT interp_pop_scope(script_ctx_t *ctx)
if(ctx->call_ctx->scope->ref > 1) { if(ctx->call_ctx->scope->ref > 1) {
HRESULT hres = detach_variable_object(ctx, ctx->call_ctx, FALSE); HRESULT hres = detach_variable_object(ctx, ctx->call_ctx, FALSE);
if(FAILED(hres)) if(FAILED(hres))
ERR("Failed to detach variable object: %08x\n", hres); ERR("Failed to detach variable object: %08lx\n", hres);
} }
scope_pop(&ctx->call_ctx->scope); scope_pop(&ctx->call_ctx->scope);
@ -1073,7 +1073,7 @@ static HRESULT interp_throw_ref(script_ctx_t *ctx)
{ {
const HRESULT arg = get_op_uint(ctx, 0); const HRESULT arg = get_op_uint(ctx, 0);
TRACE("%08x\n", arg); TRACE("%08lx\n", arg);
return arg; return arg;
} }
@ -1084,7 +1084,7 @@ static HRESULT interp_throw_type(script_ctx_t *ctx)
jsstr_t *str = get_op_str(ctx, 1); jsstr_t *str = get_op_str(ctx, 1);
const WCHAR *ptr; const WCHAR *ptr;
TRACE("%08x %s\n", hres, debugstr_jsstr(str)); TRACE("%08lx %s\n", hres, debugstr_jsstr(str));
ptr = jsstr_flatten(str); ptr = jsstr_flatten(str);
return ptr ? throw_error(ctx, hres, ptr) : E_OUTOFMEMORY; return ptr ? throw_error(ctx, hres, ptr) : E_OUTOFMEMORY;
@ -1320,7 +1320,7 @@ static HRESULT interp_memberid(script_ctx_t *ctx)
exprval_set_exception(&ref, JS_E_INVALID_PROPERTY); exprval_set_exception(&ref, JS_E_INVALID_PROPERTY);
hres = S_OK; hres = S_OK;
}else { }else {
ERR("failed %08x\n", hres); ERR("failed %08lx\n", hres);
return hres; return hres;
} }
} }
@ -2705,7 +2705,7 @@ static HRESULT interp_to_string(script_ctx_t *ctx)
hres = to_string(ctx, v, &str); hres = to_string(ctx, v, &str);
jsval_release(v); jsval_release(v);
if(FAILED(hres)) { if(FAILED(hres)) {
WARN("failed %08x\n", hres); WARN("failed %08lx\n", hres);
return hres; return hres;
} }
@ -2765,7 +2765,7 @@ static HRESULT interp_set_member(script_ctx_t *ctx)
jsstr_release(get_string(namev)); jsstr_release(get_string(namev));
} }
if(FAILED(hres)) { if(FAILED(hres)) {
WARN("failed %08x\n", hres); WARN("failed %08lx\n", hres);
jsval_release(value); jsval_release(value);
return hres; return hres;
} }
@ -2913,7 +2913,7 @@ static void pop_call_frame(script_ctx_t *ctx)
if(frame->scope && frame->scope->ref > 1) { if(frame->scope && frame->scope->ref > 1) {
HRESULT hres = detach_variable_object(ctx, frame, TRUE); HRESULT hres = detach_variable_object(ctx, frame, TRUE);
if(FAILED(hres)) if(FAILED(hres))
ERR("Failed to detach variable object: %08x\n", hres); ERR("Failed to detach variable object: %08lx\n", hres);
} }
if(frame->arguments_obj) if(frame->arguments_obj)
@ -2984,7 +2984,7 @@ static HRESULT unwind_exception(script_ctx_t *ctx, HRESULT exception_hres)
jsdisp_t *error_obj; jsdisp_t *error_obj;
jsval_t msg; jsval_t msg;
WARN("Exception %08x %s", exception_hres, debugstr_jsval(ei->valid_value ? ei->value : jsval_undefined())); WARN("Exception %08lx %s", exception_hres, debugstr_jsval(ei->valid_value ? ei->value : jsval_undefined()));
if(ei->valid_value && jsval_type(ei->value) == JSV_OBJECT) { if(ei->valid_value && jsval_type(ei->value) == JSV_OBJECT) {
error_obj = to_jsdisp(get_object(ei->value)); error_obj = to_jsdisp(get_object(ei->value));
if(error_obj) { if(error_obj) {
@ -3125,7 +3125,7 @@ static HRESULT bind_event_target(script_ctx_t *ctx, function_code_t *func, jsdis
hres = IBindEventHandler_BindHandler(target, func->name, (IDispatch*)&func_obj->IDispatchEx_iface); hres = IBindEventHandler_BindHandler(target, func->name, (IDispatch*)&func_obj->IDispatchEx_iface);
IBindEventHandler_Release(target); IBindEventHandler_Release(target);
if(FAILED(hres)) if(FAILED(hres))
WARN("BindEvent failed: %08x\n", hres); WARN("BindEvent failed: %08lx\n", hres);
}else { }else {
FIXME("No IBindEventHandler, not yet supported binding\n"); FIXME("No IBindEventHandler, not yet supported binding\n");
} }

View File

@ -396,7 +396,7 @@ static jsstr_t *format_error_message(HRESULT error, const WCHAR *arg)
HRESULT throw_error(script_ctx_t *ctx, HRESULT error, const WCHAR *str) HRESULT throw_error(script_ctx_t *ctx, HRESULT error, const WCHAR *str)
{ {
jsexcept_t *ei = ctx->ei; jsexcept_t *ei = ctx->ei;
TRACE("%08x\n", error); TRACE("%08lx\n", error);
reset_ei(ei); reset_ei(ei);
ei->error = error; ei->error = error;
if(str) if(str)

View File

@ -160,7 +160,7 @@ HRESULT JSGlobal_eval(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned a
TRACE("parsing %s\n", debugstr_jsval(argv[0])); TRACE("parsing %s\n", debugstr_jsval(argv[0]));
hres = compile_script(ctx, src, 0, 0, NULL, NULL, TRUE, FALSE, frame ? frame->bytecode->named_item : NULL, &code); hres = compile_script(ctx, src, 0, 0, NULL, NULL, TRUE, FALSE, frame ? frame->bytecode->named_item : NULL, &code);
if(FAILED(hres)) { if(FAILED(hres)) {
WARN("parse (%s) failed: %08x\n", debugstr_jsval(argv[0]), hres); WARN("parse (%s) failed: %08lx\n", debugstr_jsval(argv[0]), hres);
return hres; return hres;
} }

View File

@ -139,7 +139,7 @@ static HRESULT retrieve_named_item_disp(IActiveScriptSite *site, named_item_t *i
hr = IActiveScriptSite_GetItemInfo(site, item->name, SCRIPTINFO_IUNKNOWN, &unk, NULL); hr = IActiveScriptSite_GetItemInfo(site, item->name, SCRIPTINFO_IUNKNOWN, &unk, NULL);
if(FAILED(hr)) { if(FAILED(hr)) {
WARN("GetItemInfo failed: %08x\n", hr); WARN("GetItemInfo failed: %08lx\n", hr);
return hr; return hr;
} }
@ -215,7 +215,7 @@ static ULONG WINAPI JScriptError_AddRef(IActiveScriptError *iface)
JScriptError *This = impl_from_IActiveScriptError(iface); JScriptError *This = impl_from_IActiveScriptError(iface);
LONG ref = InterlockedIncrement(&This->ref); LONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p) ref=%d\n", This, ref); TRACE("(%p) ref=%ld\n", This, ref);
return ref; return ref;
} }
@ -225,7 +225,7 @@ static ULONG WINAPI JScriptError_Release(IActiveScriptError *iface)
JScriptError *This = impl_from_IActiveScriptError(iface); JScriptError *This = impl_from_IActiveScriptError(iface);
LONG ref = InterlockedDecrement(&This->ref); LONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p) ref=%d\n", This, ref); TRACE("(%p) ref=%ld\n", This, ref);
if(!ref) { if(!ref) {
reset_ei(&This->ei); reset_ei(&This->ei);
@ -355,7 +355,7 @@ HRESULT leave_script(script_ctx_t *ctx, HRESULT result)
ei->error = result; ei->error = result;
} }
if(FAILED(result)) { if(FAILED(result)) {
WARN("%08x\n", result); WARN("%08lx\n", result);
if(ctx->site && (error = heap_alloc(sizeof(*error)))) { if(ctx->site && (error = heap_alloc(sizeof(*error)))) {
HRESULT hres; HRESULT hres;
@ -565,7 +565,7 @@ static ULONG WINAPI AXSite_AddRef(IServiceProvider *iface)
AXSite *This = impl_from_IServiceProvider(iface); AXSite *This = impl_from_IServiceProvider(iface);
LONG ref = InterlockedIncrement(&This->ref); LONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p) ref=%d\n", This, ref); TRACE("(%p) ref=%ld\n", This, ref);
return ref; return ref;
} }
@ -575,7 +575,7 @@ static ULONG WINAPI AXSite_Release(IServiceProvider *iface)
AXSite *This = impl_from_IServiceProvider(iface); AXSite *This = impl_from_IServiceProvider(iface);
LONG ref = InterlockedDecrement(&This->ref); LONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p) ref=%d\n", This, ref); TRACE("(%p) ref=%ld\n", This, ref);
if(!ref) if(!ref)
{ {
@ -616,7 +616,7 @@ IUnknown *create_ax_site(script_ctx_t *ctx)
hres = IActiveScriptSite_QueryInterface(ctx->site, &IID_IServiceProvider, (void**)&sp); hres = IActiveScriptSite_QueryInterface(ctx->site, &IID_IServiceProvider, (void**)&sp);
if(FAILED(hres)) { if(FAILED(hres)) {
TRACE("Could not get IServiceProvider iface: %08x\n", hres); TRACE("Could not get IServiceProvider iface: %08lx\n", hres);
} }
ret = heap_alloc(sizeof(AXSite)); ret = heap_alloc(sizeof(AXSite));
@ -683,7 +683,7 @@ static ULONG WINAPI JScript_AddRef(IActiveScript *iface)
JScript *This = impl_from_IActiveScript(iface); JScript *This = impl_from_IActiveScript(iface);
LONG ref = InterlockedIncrement(&This->ref); LONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p) ref=%d\n", This, ref); TRACE("(%p) ref=%ld\n", This, ref);
return ref; return ref;
} }
@ -693,7 +693,7 @@ static ULONG WINAPI JScript_Release(IActiveScript *iface)
JScript *This = impl_from_IActiveScript(iface); JScript *This = impl_from_IActiveScript(iface);
LONG ref = InterlockedDecrement(&This->ref); LONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p) ref=%d\n", iface, ref); TRACE("(%p) ref=%ld\n", iface, ref);
if(!ref) { if(!ref) {
if(This->ctx && This->ctx->state != SCRIPTSTATE_CLOSED) if(This->ctx && This->ctx->state != SCRIPTSTATE_CLOSED)
@ -880,7 +880,7 @@ static HRESULT WINAPI JScript_AddNamedItem(IActiveScript *iface,
IDispatch *disp = NULL; IDispatch *disp = NULL;
HRESULT hres; HRESULT hres;
TRACE("(%p)->(%s %x)\n", This, debugstr_w(pstrName), dwFlags); TRACE("(%p)->(%s %lx)\n", This, debugstr_w(pstrName), dwFlags);
if(This->thread_id != GetCurrentThreadId() || !This->ctx || This->ctx->state == SCRIPTSTATE_CLOSED) if(This->thread_id != GetCurrentThreadId() || !This->ctx || This->ctx->state == SCRIPTSTATE_CLOSED)
return E_UNEXPECTED; return E_UNEXPECTED;
@ -890,7 +890,7 @@ static HRESULT WINAPI JScript_AddNamedItem(IActiveScript *iface,
hres = IActiveScriptSite_GetItemInfo(This->site, pstrName, SCRIPTINFO_IUNKNOWN, &unk, NULL); hres = IActiveScriptSite_GetItemInfo(This->site, pstrName, SCRIPTINFO_IUNKNOWN, &unk, NULL);
if(FAILED(hres)) { if(FAILED(hres)) {
WARN("GetItemInfo failed: %08x\n", hres); WARN("GetItemInfo failed: %08lx\n", hres);
return hres; return hres;
} }
@ -1064,7 +1064,7 @@ static HRESULT WINAPI JScriptParse_AddScriptlet(IActiveScriptParse *iface,
BSTR *pbstrName, EXCEPINFO *pexcepinfo) BSTR *pbstrName, EXCEPINFO *pexcepinfo)
{ {
JScript *This = impl_from_IActiveScriptParse(iface); JScript *This = impl_from_IActiveScriptParse(iface);
FIXME("(%p)->(%s %s %s %s %s %s %s %u %x %p %p)\n", This, debugstr_w(pstrDefaultName), FIXME("(%p)->(%s %s %s %s %s %s %s %lu %lx %p %p)\n", This, debugstr_w(pstrDefaultName),
debugstr_w(pstrCode), debugstr_w(pstrItemName), debugstr_w(pstrSubItemName), debugstr_w(pstrCode), debugstr_w(pstrItemName), debugstr_w(pstrSubItemName),
debugstr_w(pstrEventName), debugstr_w(pstrDelimiter), wine_dbgstr_longlong(dwSourceContextCookie), debugstr_w(pstrEventName), debugstr_w(pstrDelimiter), wine_dbgstr_longlong(dwSourceContextCookie),
ulStartingLineNumber, dwFlags, pbstrName, pexcepinfo); ulStartingLineNumber, dwFlags, pbstrName, pexcepinfo);
@ -1082,7 +1082,7 @@ static HRESULT WINAPI JScriptParse_ParseScriptText(IActiveScriptParse *iface,
jsexcept_t ei; jsexcept_t ei;
HRESULT hres; HRESULT hres;
TRACE("(%p)->(%s %s %p %s %s %u %x %p %p)\n", This, debugstr_w(pstrCode), TRACE("(%p)->(%s %s %p %s %s %lu %lx %p %p)\n", This, debugstr_w(pstrCode),
debugstr_w(pstrItemName), punkContext, debugstr_w(pstrDelimiter), debugstr_w(pstrItemName), punkContext, debugstr_w(pstrDelimiter),
wine_dbgstr_longlong(dwSourceContextCookie), ulStartingLine, dwFlags, pvarResult, pexcepinfo); wine_dbgstr_longlong(dwSourceContextCookie), ulStartingLine, dwFlags, pvarResult, pexcepinfo);
@ -1185,7 +1185,7 @@ static HRESULT WINAPI JScriptParseProcedure_ParseProcedureText(IActiveScriptPars
jsexcept_t ei; jsexcept_t ei;
HRESULT hres; HRESULT hres;
TRACE("(%p)->(%s %s %s %s %p %s %s %u %x %p)\n", This, debugstr_w(pstrCode), debugstr_w(pstrFormalParams), TRACE("(%p)->(%s %s %s %s %p %s %s %lu %lx %p)\n", This, debugstr_w(pstrCode), debugstr_w(pstrFormalParams),
debugstr_w(pstrProcedureName), debugstr_w(pstrItemName), punkContext, debugstr_w(pstrDelimiter), debugstr_w(pstrProcedureName), debugstr_w(pstrItemName), punkContext, debugstr_w(pstrDelimiter),
wine_dbgstr_longlong(dwSourceContextCookie), ulStartingLineNumber, dwFlags, ppdisp); wine_dbgstr_longlong(dwSourceContextCookie), ulStartingLineNumber, dwFlags, ppdisp);
@ -1249,7 +1249,7 @@ static HRESULT WINAPI JScriptProperty_GetProperty(IActiveScriptProperty *iface,
VARIANT *pvarIndex, VARIANT *pvarValue) VARIANT *pvarIndex, VARIANT *pvarValue)
{ {
JScript *This = impl_from_IActiveScriptProperty(iface); JScript *This = impl_from_IActiveScriptProperty(iface);
FIXME("(%p)->(%x %p %p)\n", This, dwProperty, pvarIndex, pvarValue); FIXME("(%p)->(%lx %p %p)\n", This, dwProperty, pvarIndex, pvarValue);
return E_NOTIMPL; return E_NOTIMPL;
} }
@ -1258,7 +1258,7 @@ static HRESULT WINAPI JScriptProperty_SetProperty(IActiveScriptProperty *iface,
{ {
JScript *This = impl_from_IActiveScriptProperty(iface); JScript *This = impl_from_IActiveScriptProperty(iface);
TRACE("(%p)->(%x %s %s)\n", This, dwProperty, debugstr_variant(pvarIndex), debugstr_variant(pvarValue)); TRACE("(%p)->(%lx %s %s)\n", This, dwProperty, debugstr_variant(pvarIndex), debugstr_variant(pvarValue));
if(pvarIndex) if(pvarIndex)
FIXME("unsupported pvarIndex\n"); FIXME("unsupported pvarIndex\n");
@ -1275,7 +1275,7 @@ static HRESULT WINAPI JScriptProperty_SetProperty(IActiveScriptProperty *iface,
This->html_mode = (V_I4(pvarValue) & SCRIPTLANGUAGEVERSION_HTML) != 0; This->html_mode = (V_I4(pvarValue) & SCRIPTLANGUAGEVERSION_HTML) != 0;
break; break;
default: default:
FIXME("Unimplemented property %x\n", dwProperty); FIXME("Unimplemented property %lx\n", dwProperty);
return E_NOTIMPL; return E_NOTIMPL;
} }
@ -1336,7 +1336,7 @@ static HRESULT WINAPI JScriptSafety_SetInterfaceSafetyOptions(IObjectSafety *ifa
{ {
JScript *This = impl_from_IObjectSafety(iface); JScript *This = impl_from_IObjectSafety(iface);
TRACE("(%p)->(%s %x %x)\n", This, debugstr_guid(riid), dwOptionSetMask, dwEnabledOptions); TRACE("(%p)->(%s %lx %lx)\n", This, debugstr_guid(riid), dwOptionSetMask, dwEnabledOptions);
if(dwOptionSetMask & ~SUPPORTED_OPTIONS) if(dwOptionSetMask & ~SUPPORTED_OPTIONS)
return E_FAIL; return E_FAIL;
@ -1383,7 +1383,7 @@ static HRESULT WINAPI VariantChangeType_ChangeType(IVariantChangeType *iface, VA
VARIANT res; VARIANT res;
HRESULT hres; HRESULT hres;
TRACE("(%p)->(%p %s %x %s)\n", This, dst, debugstr_variant(src), lcid, debugstr_vt(vt)); TRACE("(%p)->(%p %s %lx %s)\n", This, dst, debugstr_variant(src), lcid, debugstr_vt(vt));
if(!This->ctx) { if(!This->ctx) {
FIXME("Object uninitialized\n"); FIXME("Object uninitialized\n");

View File

@ -158,7 +158,7 @@ static IClassFactory JScriptEncodeFactory = { &JScriptEncodeFactoryVtbl };
*/ */
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
{ {
TRACE("(%p %d %p)\n", hInstDLL, fdwReason, lpv); TRACE("(%p %ld %p)\n", hInstDLL, fdwReason, lpv);
switch(fdwReason) { switch(fdwReason) {
case DLL_PROCESS_ATTACH: case DLL_PROCESS_ATTACH:
@ -200,7 +200,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
*/ */
HRESULT WINAPI DllCanUnloadNow(void) HRESULT WINAPI DllCanUnloadNow(void)
{ {
TRACE("() ref=%d\n", module_ref); TRACE("() ref=%ld\n", module_ref);
return module_ref ? S_FALSE : S_OK; return module_ref ? S_FALSE : S_OK;
} }

View File

@ -620,7 +620,7 @@ HRESULT create_regexp(script_ctx_t *ctx, jsstr_t *src, DWORD flags, jsdisp_t **r
if(!str) if(!str)
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
TRACE("%s %x\n", debugstr_wn(str, jsstr_length(src)), flags); TRACE("%s %lx\n", debugstr_wn(str, jsstr_length(src)), flags);
hres = alloc_regexp(ctx, NULL, &regexp); hres = alloc_regexp(ctx, NULL, &regexp);
if(FAILED(hres)) if(FAILED(hres))

View File

@ -1000,7 +1000,7 @@ static ULONG WINAPI JSCaller_AddRef(IServiceProvider *iface)
JSCaller *This = impl_from_IServiceProvider(iface); JSCaller *This = impl_from_IServiceProvider(iface);
LONG ref = InterlockedIncrement(&This->ref); LONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p) ref=%d\n", This, ref); TRACE("(%p) ref=%ld\n", This, ref);
return ref; return ref;
} }
@ -1010,7 +1010,7 @@ static ULONG WINAPI JSCaller_Release(IServiceProvider *iface)
JSCaller *This = impl_from_IServiceProvider(iface); JSCaller *This = impl_from_IServiceProvider(iface);
LONG ref = InterlockedIncrement(&This->ref); LONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p) ref=%d\n", This, ref); TRACE("(%p) ref=%ld\n", This, ref);
if(!ref) { if(!ref) {
assert(!This->ctx); assert(!This->ctx);

View File

@ -1935,7 +1935,7 @@ PushBackTrackState(REGlobalData *gData, REOp op,
ptrdiff_t btincr = ((char *)result + sz) - ptrdiff_t btincr = ((char *)result + sz) -
((char *)gData->backTrackStack + btsize); ((char *)gData->backTrackStack + btsize);
TRACE("\tBT_Push: %lu,%lu\n", (ULONG_PTR)parenIndex, (ULONG_PTR)parenCount); TRACE("\tBT_Push: %Iu,%Iu\n", (ULONG_PTR)parenIndex, (ULONG_PTR)parenCount);
JS_COUNT_OPERATION(gData->cx, JSOW_JUMP * (1 + parenCount)); JS_COUNT_OPERATION(gData->cx, JSOW_JUMP * (1 + parenCount));
if (btincr > 0) { if (btincr > 0) {
@ -2684,7 +2684,7 @@ ExecuteREBytecode(REGlobalData *gData, match_state_t *x)
case REOP_LPAREN: case REOP_LPAREN:
pc = ReadCompactIndex(pc, &parenIndex); pc = ReadCompactIndex(pc, &parenIndex);
TRACE("[ %lu ]\n", (ULONG_PTR)parenIndex); TRACE("[ %Iu ]\n", (ULONG_PTR)parenIndex);
assert(parenIndex < gData->regexp->parenCount); assert(parenIndex < gData->regexp->parenCount);
if (parenIndex + 1 > parenSoFar) if (parenIndex + 1 > parenSoFar)
parenSoFar = parenIndex + 1; parenSoFar = parenIndex + 1;
@ -3047,7 +3047,7 @@ ExecuteREBytecode(REGlobalData *gData, match_state_t *x)
parenSoFar = curState->parenSoFar; parenSoFar = curState->parenSoFar;
} }
TRACE("\tBT_Pop: %ld,%ld\n", TRACE("\tBT_Pop: %Id,%Id\n",
(ULONG_PTR)backTrackData->parenIndex, (ULONG_PTR)backTrackData->parenIndex,
(ULONG_PTR)backTrackData->parenCount); (ULONG_PTR)backTrackData->parenCount);
continue; continue;

View File

@ -1151,7 +1151,7 @@ static HRESULT String_split(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsi
hres = regexp_match_next(ctx, regexp, REM_NO_PARENS, jsstr, &match_ptr); hres = regexp_match_next(ctx, regexp, REM_NO_PARENS, jsstr, &match_ptr);
if(hres != S_OK) if(hres != S_OK)
break; break;
TRACE("got match %d %d\n", (int)(match_result.cp - match_result.match_len - str), match_result.match_len); TRACE("got match %d %ld\n", (int)(match_result.cp - match_result.match_len - str), match_result.match_len);
if(!match_result.match_len) { if(!match_result.match_len) {
/* If an empty string is matched, prevent including any match in the result */ /* If an empty string is matched, prevent including any match in the result */
if(!length) { if(!length) {
@ -1163,7 +1163,7 @@ static HRESULT String_split(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsi
hres = regexp_match_next(ctx, regexp, REM_NO_PARENS, jsstr, &match_ptr); hres = regexp_match_next(ctx, regexp, REM_NO_PARENS, jsstr, &match_ptr);
if(hres != S_OK) if(hres != S_OK)
break; break;
TRACE("retried, got match %d %d\n", (int)(match_result.cp - match_result.match_len - str), TRACE("retried, got match %d %ld\n", (int)(match_result.cp - match_result.match_len - str),
match_result.match_len); match_result.match_len);
} }
if(!match_result.match_len && match_result.cp == str + length) if(!match_result.match_len && match_result.cp == str + length)
@ -1461,7 +1461,7 @@ static HRESULT String_trim(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsig
hres = to_flat_string(ctx, jsval_disp(jsthis->u.disp), &jsstr, &str); hres = to_flat_string(ctx, jsval_disp(jsthis->u.disp), &jsstr, &str);
if(FAILED(hres)) { if(FAILED(hres)) {
WARN("to_flat_string failed: %08x\n", hres); WARN("to_flat_string failed: %08lx\n", hres);
return hres; return hres;
} }
len = jsstr_length(jsstr); len = jsstr_length(jsstr);