Michael Stefaniuc : jscript: Remove superfluous pointer casts.
Alexandre Julliard
julliard at winehq.org
Mon Feb 2 09:01:20 CST 2009
Module: wine
Branch: master
Commit: 981f733e41b3cc793c519de38dc8d5ac15c3dc97
URL: http://source.winehq.org/git/wine.git/?a=commit;h=981f733e41b3cc793c519de38dc8d5ac15c3dc97
Author: Michael Stefaniuc <mstefani at redhat.de>
Date: Mon Feb 2 11:01:02 2009 +0100
jscript: Remove superfluous pointer casts.
---
dlls/jscript/engine.c | 2 +-
dlls/jscript/jscript.c | 10 +++++-----
dlls/jscript/lex.c | 4 ++--
dlls/jscript/regexp.c | 16 ++++++++--------
4 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c
index 423df46..05c6225 100644
--- a/dlls/jscript/engine.c
+++ b/dlls/jscript/engine.c
@@ -497,7 +497,7 @@ static HRESULT identifier_eval(exec_ctx_t *ctx, BSTR identifier, DWORD flags, ex
}
if(item) {
- exprval_set_idref(ret, (IDispatch*)item->disp, id);
+ exprval_set_idref(ret, item->disp, id);
return S_OK;
}
diff --git a/dlls/jscript/jscript.c b/dlls/jscript/jscript.c
index bc182f4..de7cf96 100644
--- a/dlls/jscript/jscript.c
+++ b/dlls/jscript/jscript.c
@@ -44,11 +44,11 @@ typedef struct {
parser_ctx_t *queue_tail;
} JScript;
-#define ACTSCRIPT(x) ((IActiveScript*) &(x)->lpIActiveScriptVtbl)
-#define ASPARSE(x) ((IActiveScriptParse*) &(x)->lpIActiveScriptParseVtbl)
-#define ASPARSEPROC(x) ((IActiveScriptParseProcedure2*) &(x)->lpIActiveScriptParseProcedure2Vtbl)
-#define ACTSCPPROP(x) ((IActiveScriptProperty*) &(x)->lpIActiveScriptPropertyVtbl)
-#define OBJSAFETY(x) ((IObjectSafety*) &(x)->lpIObjectSafetyVtbl)
+#define ACTSCRIPT(x) ((IActiveScript*) &(x)->lpIActiveScriptVtbl)
+#define ASPARSE(x) (&(x)->lpIActiveScriptParseVtbl)
+#define ASPARSEPROC(x) (&(x)->lpIActiveScriptParseProcedure2Vtbl)
+#define ACTSCPPROP(x) (&(x)->lpIActiveScriptPropertyVtbl)
+#define OBJSAFETY(x) (&(x)->lpIObjectSafetyVtbl)
void script_release(script_ctx_t *ctx)
{
diff --git a/dlls/jscript/lex.c b/dlls/jscript/lex.c
index a937804..bf298bf 100644
--- a/dlls/jscript/lex.c
+++ b/dlls/jscript/lex.c
@@ -479,7 +479,7 @@ int parser_lex(void *lval, parser_ctx_t *ctx)
if(ret)
return ret;
- return parse_identifier(ctx, (const WCHAR**)lval);
+ return parse_identifier(ctx, lval);
}
if(isdigitW(*ctx->ptr))
@@ -684,7 +684,7 @@ int parser_lex(void *lval, parser_ctx_t *ctx)
case '\"':
case '\'':
- return parse_string_literal(ctx, (const WCHAR**)lval, *ctx->ptr);
+ return parse_string_literal(ctx, lval, *ctx->ptr);
case '_':
case '$':
diff --git a/dlls/jscript/regexp.c b/dlls/jscript/regexp.c
index c531f26..8ae2152 100644
--- a/dlls/jscript/regexp.c
+++ b/dlls/jscript/regexp.c
@@ -559,7 +559,7 @@ EmitREBytecode(CompilerState *state, JSRegExp *re, size_t treeDepth,
emitStateSP->jumpToJumpFlag = FALSE;
++emitStateSP;
assert((size_t)(emitStateSP - emitStateStack) <= treeDepth);
- t = (RENode *) t->kid;
+ t = t->kid;
op = t->op;
assert(op < REOP_LIMIT);
continue;
@@ -572,7 +572,7 @@ EmitREBytecode(CompilerState *state, JSRegExp *re, size_t treeDepth,
emitStateSP->continueOp = REOP_ENDALT;
++emitStateSP;
assert((size_t)(emitStateSP - emitStateStack) <= treeDepth);
- t = (RENode *) t->u.kid2;
+ t = t->u.kid2;
op = t->op;
assert(op < REOP_LIMIT);
continue;
@@ -676,7 +676,7 @@ EmitREBytecode(CompilerState *state, JSRegExp *re, size_t treeDepth,
emitStateSP->jumpToJumpFlag = FALSE;
++emitStateSP;
assert((size_t)(emitStateSP - emitStateStack) <= treeDepth);
- t = (RENode *) t->kid;
+ t = t->kid;
op = t->op;
assert(op < REOP_LIMIT);
continue;
@@ -699,7 +699,7 @@ EmitREBytecode(CompilerState *state, JSRegExp *re, size_t treeDepth,
while (t->next &&
t->next->op == REOP_FLAT &&
(WCHAR*)t->kid + t->u.flat.length ==
- (WCHAR*)t->next->kid) {
+ t->next->kid) {
t->u.flat.length += t->next->u.flat.length;
t->next = t->next->next;
}
@@ -727,7 +727,7 @@ EmitREBytecode(CompilerState *state, JSRegExp *re, size_t treeDepth,
emitStateSP->continueOp = REOP_RPAREN;
++emitStateSP;
assert((size_t)(emitStateSP - emitStateStack) <= treeDepth);
- t = (RENode *) t->kid;
+ t = t->kid;
op = t->op;
continue;
@@ -747,7 +747,7 @@ EmitREBytecode(CompilerState *state, JSRegExp *re, size_t treeDepth,
emitStateSP->continueOp = REOP_ASSERTTEST;
++emitStateSP;
assert((size_t)(emitStateSP - emitStateStack) <= treeDepth);
- t = (RENode *) t->kid;
+ t = t->kid;
op = t->op;
continue;
@@ -765,7 +765,7 @@ EmitREBytecode(CompilerState *state, JSRegExp *re, size_t treeDepth,
emitStateSP->continueOp = REOP_ASSERTNOTTEST;
++emitStateSP;
assert((size_t)(emitStateSP - emitStateStack) <= treeDepth);
- t = (RENode *) t->kid;
+ t = t->kid;
op = t->op;
continue;
@@ -793,7 +793,7 @@ EmitREBytecode(CompilerState *state, JSRegExp *re, size_t treeDepth,
emitStateSP->continueOp = REOP_ENDCHILD;
++emitStateSP;
assert((size_t)(emitStateSP - emitStateStack) <= treeDepth);
- t = (RENode *) t->kid;
+ t = t->kid;
op = t->op;
continue;
More information about the wine-cvs
mailing list