diff options
author | dgp <dgp@users.sourceforge.net> | 2005-10-19 18:39:58 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2005-10-19 18:39:58 (GMT) |
commit | 91a8a2453afae40f8b0ea245f5ad809cc58cb829 (patch) | |
tree | 16181e123a2aae36dc453accc1839aba7fa497d5 /generic/tclCompCmds.c | |
parent | ab736a53a85538ce60e2cdc6ec235ed0f5edc91f (diff) | |
download | tcl-91a8a2453afae40f8b0ea245f5ad809cc58cb829.zip tcl-91a8a2453afae40f8b0ea245f5ad809cc58cb829.tar.gz tcl-91a8a2453afae40f8b0ea245f5ad809cc58cb829.tar.bz2 |
* generic/tclClock.c: Removed some dead code.
* generic/tclCmdIL.c:
* generic/tclCompCmds.c:
* generic/tclDictObj.c:
* generic/tclExecute.c:
* generic/tclLiteral.c:
* generic/tclParseExpr.c:
* generic/tclScan.c:
* generic/tclUtil.c:
* generic/tclVar.c:
Diffstat (limited to 'generic/tclCompCmds.c')
-rw-r--r-- | generic/tclCompCmds.c | 51 |
1 files changed, 9 insertions, 42 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index 684d994..6ed09ca 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmds.c,v 1.79 2005/10/10 20:28:00 msofer Exp $ + * RCS: @(#) $Id: tclCompCmds.c,v 1.80 2005/10/19 18:39:58 dgp Exp $ */ #include "tclInt.h" @@ -622,22 +622,6 @@ TclCompileDictCmd(interp, parsePtr, envPtr) word = incrTokenPtr[1].start; numBytes = incrTokenPtr[1].size; -#if 0 - /* - * Note there is a danger that modifying the string could have - * undesirable side effects. In this case, TclLooksLikeInt has no - * dependencies on shared strings so we should be safe. - */ - - if (!TclLooksLikeInt(word, numBytes)) { - return TCL_ERROR; - } -#endif - - /* - * Now try to really parse the number. - */ - intObj = Tcl_NewStringObj(word, numBytes); Tcl_IncrRefCount(intObj); code = Tcl_GetIntFromObj(NULL, intObj, &incrAmount); @@ -1970,27 +1954,14 @@ TclCompileIncrCmd(interp, parsePtr, envPtr) if (incrTokenPtr->type == TCL_TOKEN_SIMPLE_WORD) { CONST char *word = incrTokenPtr[1].start; int numBytes = incrTokenPtr[1].size; -#if 0 - /* - * Note there is a danger that modifying the string could have - * undesirable side effects. In this case, TclLooksLikeInt has - * no dependencies on shared strings so we should be safe. - */ - - if (TclLooksLikeInt(word, numBytes)) { -#endif - int code; - Tcl_Obj *intObj = Tcl_NewStringObj(word, numBytes); - Tcl_IncrRefCount(intObj); - code = Tcl_GetIntFromObj(NULL, intObj, &immValue); - Tcl_DecrRefCount(intObj); - if ((code == TCL_OK) - && (-127 <= immValue) && (immValue <= 127)) { - haveImmValue = 1; - } -#if 0 + int code; + Tcl_Obj *intObj = Tcl_NewStringObj(word, numBytes); + Tcl_IncrRefCount(intObj); + code = Tcl_GetIntFromObj(NULL, intObj, &immValue); + Tcl_DecrRefCount(intObj); + if ((code == TCL_OK) && (-127 <= immValue) && (immValue <= 127)) { + haveImmValue = 1; } -#endif if (!haveImmValue) { PushLiteral(envPtr, word, numBytes); } @@ -2293,11 +2264,7 @@ TclCompileLindexCmd(interp, parsePtr, envPtr) varTokenPtr = TokenAfter(parsePtr->tokenPtr); - if ((numWords == 3) && (varTokenPtr->type == TCL_TOKEN_SIMPLE_WORD) -#if 0 - && TclLooksLikeInt(varTokenPtr[1].start, varTokenPtr[1].size) -#endif - ) { + if ((numWords == 3) && (varTokenPtr->type == TCL_TOKEN_SIMPLE_WORD)) { Tcl_Obj *tmpObj; int idx, result; |