diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2011-08-16 13:55:06 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2011-08-16 13:55:06 (GMT) |
commit | 754781a8ca6a7ff2617e2dea8f8fc569c868445e (patch) | |
tree | dfac520f6bcb71143cd81124598bdb9d07e00d0b /generic/tclVar.c | |
parent | 0769533296f892df58d869c9d898a51f9a7ca1bf (diff) | |
download | tcl-754781a8ca6a7ff2617e2dea8f8fc569c868445e.zip tcl-754781a8ca6a7ff2617e2dea8f8fc569c868445e.tar.gz tcl-754781a8ca6a7ff2617e2dea8f8fc569c868445e.tar.bz2 |
Small changes to quell gcc warnings and make message generation less ugly.
Diffstat (limited to 'generic/tclVar.c')
-rw-r--r-- | generic/tclVar.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/generic/tclVar.c b/generic/tclVar.c index 62bf1c4..4df5d43 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -3077,21 +3077,18 @@ ArrayStartSearchCmd( hPtr = Tcl_CreateHashEntry(&iPtr->varSearches, varPtr, &isNew); if (isNew) { searchPtr->id = 1; - Tcl_AppendResult(interp, "s-1-", varName, NULL); varPtr->flags |= VAR_SEARCH_ACTIVE; searchPtr->nextPtr = NULL; } else { - char string[TCL_INTEGER_SPACE]; - searchPtr->id = ((ArraySearch *) Tcl_GetHashValue(hPtr))->id + 1; - TclFormatInt(string, searchPtr->id); - Tcl_AppendResult(interp, "s-", string, "-", varName, NULL); searchPtr->nextPtr = Tcl_GetHashValue(hPtr); } searchPtr->varPtr = varPtr; searchPtr->nextEntry = VarHashFirstEntry(varPtr->value.tablePtr, &searchPtr->search); Tcl_SetHashValue(hPtr, searchPtr); + Tcl_SetObjResult(interp, + Tcl_ObjPrintf("s-%d-%s", searchPtr->id, varName)); return TCL_OK; } |