diff options
author | das <das> | 2009-07-14 21:47:42 (GMT) |
---|---|---|
committer | das <das> | 2009-07-14 21:47:42 (GMT) |
commit | 0a901b4dd0d5f48c4258a435a7015b391a292f65 (patch) | |
tree | d8589c5fcfdc1eea2e11fc3a1450dac18691b60d | |
parent | 67e100ed95642d0ec30b5718d5c2eb66535c3cbe (diff) | |
download | tcl-0a901b4dd0d5f48c4258a435a7015b391a292f65.zip tcl-0a901b4dd0d5f48c4258a435a7015b391a292f65.tar.gz tcl-0a901b4dd0d5f48c4258a435a7015b391a292f65.tar.bz2 |
fix 64bit int <-> ptr cast warnings
-rw-r--r-- | generic/tclBasic.c | 6 | ||||
-rw-r--r-- | generic/tclCmdMZ.c | 10 | ||||
-rw-r--r-- | generic/tclCompile.c | 4 |
3 files changed, 10 insertions, 10 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index fcc7d46..b6a87d7 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,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.396 2009/07/14 16:52:28 kennykb Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.397 2009/07/14 21:47:42 das Exp $ */ #include "tclInt.h" @@ -5458,11 +5458,11 @@ TclArgumentBCEnter( 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 word; - int cmd = (int) Tcl_GetHashValue(hePtr); + int cmd = PTR2INT(Tcl_GetHashValue(hePtr)); ECL* ePtr = &eclPtr->loc[cmd]; CFWordBC* lastPtr = 0; diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 9d416bc..1fb32df 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.186 2009/07/14 16:52:28 kennykb Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.187 2009/07/14 21:47:42 das Exp $ */ #include "tclInt.h" @@ -3864,8 +3864,8 @@ TclNRSwitchObjCmd( * TIP #280: Make invoking context available to switch branch. */ - Tcl_NRAddCallback(interp, SwitchPostProc, (ClientData) splitObjs, - (ClientData) ctxPtr, (ClientData) pc, + Tcl_NRAddCallback(interp, SwitchPostProc, INT2PTR(splitObjs), + (ClientData) ctxPtr, INT2PTR(pc), (ClientData) pattern); return TclNREvalObjEx(interp, objv[j], 0, ctxPtr, j); } @@ -3877,9 +3877,9 @@ SwitchPostProc( { /* Unpack the preserved data */ - int splitObjs = (int) data[0]; + int splitObjs = PTR2INT(data[0]); CmdFrame* ctxPtr = (CmdFrame*) data[1]; - int pc = (int) data[2]; + int pc = PTR2INT(data[2]); const char* pattern = (const char*) data[3]; int patternLength = strlen(pattern); diff --git a/generic/tclCompile.c b/generic/tclCompile.c index a1a7168..6168133 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.168 2009/07/14 16:34:08 andreas_kupries Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.169 2009/07/14 21:47:42 das Exp $ */ #include "tclInt.h" @@ -1536,7 +1536,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); |