diff options
author | nijtmans <nijtmans> | 2008-10-28 23:29:54 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2008-10-28 23:29:54 (GMT) |
commit | e53905d94a0952de627b0d26c1ee06b56bb9b349 (patch) | |
tree | 153430fe71b4849249604a88201de3691f0073f3 /generic/tclBasic.c | |
parent | 1a13bcfa51bd2ef9f1fef875680257ac38fc7e85 (diff) | |
download | tcl-e53905d94a0952de627b0d26c1ee06b56bb9b349.zip tcl-e53905d94a0952de627b0d26c1ee06b56bb9b349.tar.gz tcl-e53905d94a0952de627b0d26c1ee06b56bb9b349.tar.bz2 |
CONSTify TclDTraceInfo
Eliminate some -Wstrings-write warnings
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r-- | generic/tclBasic.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 7c42f4a..dbcaecd 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.373 2008/10/19 16:52:18 dkf Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.374 2008/10/28 23:29:54 nijtmans Exp $ */ #include "tclInt.h" @@ -213,10 +213,10 @@ static const CmdInfo builtInCmds[] = { {"upvar", Tcl_UpvarObjCmd, TclCompileUpvarCmd, NULL, 1}, {"variable", Tcl_VariableObjCmd, TclCompileVariableCmd, NULL, 1}, {"while", Tcl_WhileObjCmd, TclCompileWhileCmd, TclNRWhileObjCmd, 1}, - + {"coroutine", NULL, NULL, TclNRCoroutineObjCmd, 1}, {"yield", NULL, NULL, TclNRYieldObjCmd, 1}, - + /* * Commands in the OS-interface. Note that many of these are unsafe. */ @@ -4115,7 +4115,7 @@ TclNREvalObjv( } if (TCL_DTRACE_CMD_INFO_ENABLED() && iPtr->cmdFramePtr) { Tcl_Obj *info = TclInfoFrame(interp, iPtr->cmdFramePtr); - char *a[6]; int i[2]; + const char *a[6]; int i[2]; TclDTraceInfo(info, a, i); TCL_DTRACE_CMD_INFO(a[0], a[1], a[2], a[3], i[0], i[1], a[4], a[5]); @@ -4409,8 +4409,8 @@ TEOV_Exception( * numLevels has not *yet* been decreased, do not call it: do the thing * here directly. */ - - iPtr->flags &= (~(CANCELED | TCL_CANCEL_UNWIND)); + + iPtr->flags &= (~(CANCELED | TCL_CANCEL_UNWIND)); return result; } @@ -5925,10 +5925,10 @@ TEOEx_ByteCodeCallback( } /* - * We are returning to level 0, so should call TclResetCancellation. + * We are returning to level 0, so should call TclResetCancellation. * Let us just unset the flags inline. */ - + iPtr->flags &= (~(CANCELED | TCL_CANCEL_UNWIND)); } iPtr->evalFlags = 0; @@ -7695,7 +7695,7 @@ DTraceObjCmd( void TclDTraceInfo( Tcl_Obj *info, - char **args, + const char **args, int *argsi) { static Tcl_Obj *keys[10] = { NULL }; @@ -7817,7 +7817,7 @@ Tcl_NRCallObjProc( } if (TCL_DTRACE_CMD_INFO_ENABLED() && ((Interp *) interp)->cmdFramePtr) { Tcl_Obj *info = TclInfoFrame(interp, ((Interp *) interp)->cmdFramePtr); - char *a[6]; int i[2]; + const char *a[6]; int i[2]; TclDTraceInfo(info, a, i); TCL_DTRACE_CMD_INFO(a[0], a[1], a[2], a[3], i[0], i[1], a[4], a[5]); @@ -8107,7 +8107,7 @@ TclNRYieldObjCmd( { CoroutineData *corPtr = iPtr->execEnvPtr->corPtr; int numLevels = iPtr->numLevels; - + if (objc > 2) { Tcl_WrongNumArgs(interp, 1, objv, "?returnValue?"); return TCL_ERROR; @@ -8125,7 +8125,7 @@ TclNRYieldObjCmd( iPtr->numLevels = corPtr->auxNumLevels; corPtr->auxNumLevels = numLevels - corPtr->auxNumLevels; - + TclNRAddCallback(interp, NRCallTEBC, INT2PTR(TCL_NR_YIELD_TYPE), NULL, NULL, NULL); return TCL_OK; @@ -8165,7 +8165,7 @@ DeleteCoroutine( CoroutineData *corPtr = clientData; Tcl_Interp *interp = corPtr->eePtr->interp; TEOV_callback *rootPtr = TOP_CB(interp); - + if (COR_IS_SUSPENDED(corPtr)) { TclNRRunCallbacks(interp, RewindCoroutine(corPtr,TCL_OK), rootPtr, 0); } @@ -8311,7 +8311,7 @@ NRInterpCoroutine( { CoroutineData *corPtr = clientData; int nestNumLevels = corPtr->auxNumLevels; - + if ((objc != 1) && (objc != 2)) { Tcl_WrongNumArgs(interp, 1, objv, "?arg?"); return TCL_ERROR; @@ -8408,7 +8408,7 @@ TclNRCoroutineObjCmd( * On first run just set a 0 level-offset, the natural numbering is * correct. The offset will be fixed for later runs. */ - + Tcl_DStringInit(&ds); if (nsPtr != iPtr->globalNsPtr) { Tcl_DStringAppend(&ds, nsPtr->fullName, -1); @@ -8474,7 +8474,7 @@ TclNRCoroutineObjCmd( iPtr->varFramePtr = iPtr->rootFramePtr; iPtr->lookupNsPtr = iPtr->framePtr->nsPtr; corPtr->auxNumLevels = iPtr->numLevels; - + TclNRAddCallback(interp, NRCoroutineExitCallback, corPtr, NULL,NULL,NULL); return TclNRRunCallbacks(interp, TclNREvalObjEx(interp, cmdObjPtr, 0, NULL, 0), rootPtr, 0); @@ -8498,7 +8498,7 @@ TclInfoCoroutineCmd( return TCL_ERROR; } - if (corPtr && !(corPtr->cmdPtr->flags & CMD_IS_DELETED)) { + if (corPtr && !(corPtr->cmdPtr->flags & CMD_IS_DELETED)) { Tcl_Obj *namePtr; TclNewObj(namePtr); |