From 4ddce8d6445b7a711133a230e5c070aeb22f95de Mon Sep 17 00:00:00 2001 From: das Date: Wed, 15 Jul 2009 22:27:13 +0000 Subject: fix 64bit int <-> ptr cast warnings --- generic/tclBasic.c | 10 +++++----- generic/tclCompile.c | 4 ++-- generic/tclStringObj.c | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 8ce2527..c88a595 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.295.2.10 2009/07/14 16:33:12 andreas_kupries Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.295.2.11 2009/07/15 22:27:13 das Exp $ */ #include "tclInt.h" @@ -4637,10 +4637,10 @@ TclArgumentBCEnter(interp,objv,objc,codePtr,cfPtr,pc) if (hePtr) { ExtCmdLoc* eclPtr = (ExtCmdLoc*) Tcl_GetHashValue (hePtr); - hePtr = Tcl_FindHashEntry(&eclPtr->litInfo, (char*) pc); + hePtr = Tcl_FindHashEntry(&eclPtr->litInfo, INT2PTR(pc)); if (hePtr) { - int cmd = (int) Tcl_GetHashValue(hePtr); + int cmd = PTR2INT(Tcl_GetHashValue(hePtr)); ECL* ePtr = &eclPtr->loc[cmd]; int word; @@ -4722,10 +4722,10 @@ TclArgumentBCRelease(interp,objv,objc,codePtr,pc) if (hePtr) { ExtCmdLoc* eclPtr = (ExtCmdLoc*) Tcl_GetHashValue (hePtr); - hePtr = Tcl_FindHashEntry(&eclPtr->litInfo, (char*) pc); + hePtr = Tcl_FindHashEntry(&eclPtr->litInfo, INT2PTR(pc)); if (hePtr) { - int cmd = (int) Tcl_GetHashValue(hePtr); + int cmd = PTR2INT(Tcl_GetHashValue(hePtr)); ECL* ePtr = &eclPtr->loc[cmd]; int word; diff --git a/generic/tclCompile.c b/generic/tclCompile.c index e671fcf..bfc81b7 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.146.2.8 2009/07/14 16:33:12 andreas_kupries Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.146.2.9 2009/07/15 22:27:13 das Exp $ */ #include "tclInt.h" @@ -1501,7 +1501,7 @@ TclCompileScript( int isnew; Tcl_HashEntry* hePtr = Tcl_CreateHashEntry(&eclPtr->litInfo, (char*) (envPtr->codeNext - envPtr->codeStart), &isnew); - Tcl_SetHashValue(hePtr, (char*) wlineat); + Tcl_SetHashValue(hePtr, INT2PTR(wlineat)); if (wordIdx <= 255) { TclEmitInstInt1(INST_INVOKE_STK1, wordIdx, envPtr); diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 7c0ccaf..093eca3 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.70.2.15 2009/07/01 15:29:48 patthoyts Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.70.2.16 2009/07/15 22:27:14 das Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -1357,7 +1357,7 @@ AppendUnicodeToUnicodeRep( int appendNumChars) /* Number of chars of "unicode" to append. */ { String *stringPtr; - size_t numChars; + int numChars; if (appendNumChars < 0) { appendNumChars = UnicodeLength(unicode); -- cgit v0.12