jscript: Consistently use wcscmp() instead of lstrcmpW().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
da15e5cb37
commit
784b3f611a
|
@ -1419,7 +1419,7 @@ static HRESULT compile_continue_statement(compiler_ctx_t *ctx, branch_statement_
|
|||
for(iter = ctx->stat_ctx; iter; iter = iter->next) {
|
||||
if(iter->continue_label)
|
||||
pop_ctx = iter;
|
||||
if(iter->labelled_stat && !lstrcmpW(iter->labelled_stat->identifier, stat->identifier))
|
||||
if(iter->labelled_stat && !wcscmp(iter->labelled_stat->identifier, stat->identifier))
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1465,7 +1465,7 @@ static HRESULT compile_break_statement(compiler_ctx_t *ctx, branch_statement_t *
|
|||
|
||||
if(stat->identifier) {
|
||||
for(pop_ctx = ctx->stat_ctx; pop_ctx; pop_ctx = pop_ctx->next) {
|
||||
if(pop_ctx->labelled_stat && !lstrcmpW(pop_ctx->labelled_stat->identifier, stat->identifier)) {
|
||||
if(pop_ctx->labelled_stat && !wcscmp(pop_ctx->labelled_stat->identifier, stat->identifier)) {
|
||||
assert(pop_ctx->break_label);
|
||||
break;
|
||||
}
|
||||
|
@ -1549,7 +1549,7 @@ static HRESULT compile_labelled_statement(compiler_ctx_t *ctx, labelled_statemen
|
|||
HRESULT hres;
|
||||
|
||||
for(iter = ctx->stat_ctx; iter; iter = iter->next) {
|
||||
if(iter->labelled_stat && !lstrcmpW(iter->labelled_stat->identifier, stat->identifier)) {
|
||||
if(iter->labelled_stat && !wcscmp(iter->labelled_stat->identifier, stat->identifier)) {
|
||||
WARN("Label %s redefined\n", debugstr_w(stat->identifier));
|
||||
return JS_E_LABEL_REDEFINED;
|
||||
}
|
||||
|
@ -1825,7 +1825,7 @@ static HRESULT compile_statement(compiler_ctx_t *ctx, statement_ctx_t *stat_ctx,
|
|||
static int function_local_cmp(const void *key, const struct wine_rb_entry *entry)
|
||||
{
|
||||
function_local_t *local = WINE_RB_ENTRY_VALUE(entry, function_local_t, entry);
|
||||
return CompareStringOrdinal(key, -1, local->name, -1, FALSE) - 2;
|
||||
return wcscmp(key, local->name);
|
||||
}
|
||||
|
||||
static inline function_local_t *find_local(compiler_ctx_t *ctx, const WCHAR *name)
|
||||
|
|
|
@ -93,7 +93,7 @@ static const builtin_prop_t *find_builtin_prop(jsdisp_t *This, const WCHAR *name
|
|||
while(min <= max) {
|
||||
i = (min+max)/2;
|
||||
|
||||
r = CompareStringOrdinal(name, -1, This->builtin_info->props[i].name, -1, FALSE) - 2;
|
||||
r = wcscmp(name, This->builtin_info->props[i].name);
|
||||
if(!r) {
|
||||
/* Skip prop if it's available only in higher compatibility mode. */
|
||||
unsigned version = (This->builtin_info->props[i].flags & PROPF_VERSION_MASK)
|
||||
|
@ -203,7 +203,7 @@ static HRESULT find_prop_name(jsdisp_t *This, unsigned hash, const WCHAR *name,
|
|||
bucket = get_props_idx(This, hash);
|
||||
pos = This->props[bucket].bucket_head;
|
||||
while(pos != 0) {
|
||||
if(!lstrcmpW(name, This->props[pos].name)) {
|
||||
if(!wcscmp(name, This->props[pos].name)) {
|
||||
if(prev != 0) {
|
||||
This->props[prev].bucket_next = This->props[pos].bucket_next;
|
||||
This->props[pos].bucket_next = This->props[bucket].bucket_head;
|
||||
|
|
|
@ -612,9 +612,9 @@ static BOOL lookup_global_members(script_ctx_t *ctx, BSTR identifier, exprval_t
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static int local_ref_cmp(const void *key, const void *ref)
|
||||
static int __cdecl local_ref_cmp(const void *key, const void *ref)
|
||||
{
|
||||
return CompareStringOrdinal((const WCHAR*)key, -1, ((const local_ref_t*)ref)->name, -1, FALSE) - 2;
|
||||
return wcscmp((const WCHAR*)key, ((const local_ref_t*)ref)->name);
|
||||
}
|
||||
|
||||
local_ref_t *lookup_local(const function_code_t *function, const WCHAR *identifier)
|
||||
|
@ -646,7 +646,7 @@ static HRESULT identifier_eval(script_ctx_t *ctx, BSTR identifier, exprval_t *re
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
if(!lstrcmpW(identifier, argumentsW)) {
|
||||
if(!wcscmp(identifier, argumentsW)) {
|
||||
hres = detach_variable_object(ctx, scope->frame, FALSE);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
@ -670,7 +670,7 @@ static HRESULT identifier_eval(script_ctx_t *ctx, BSTR identifier, exprval_t *re
|
|||
}
|
||||
|
||||
for(item = ctx->named_items; item; item = item->next) {
|
||||
if((item->flags & SCRIPTITEM_ISVISIBLE) && !lstrcmpW(item->name, identifier)) {
|
||||
if((item->flags & SCRIPTITEM_ISVISIBLE) && !wcscmp(item->name, identifier)) {
|
||||
if(!item->disp) {
|
||||
IUnknown *unk;
|
||||
|
||||
|
|
Loading…
Reference in New Issue