diff options
author | dgp <dgp@users.sourceforge.net> | 2006-10-31 20:19:43 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2006-10-31 20:19:43 (GMT) |
commit | ce16019300e66b466f8ad327c5b3a03fe6876f8e (patch) | |
tree | 75652e34b31819c0360f9598db333054faffde99 /generic/tclNamesp.c | |
parent | 20c1156972864f916da62a217137e346eb93ac79 (diff) | |
download | tcl-ce16019300e66b466f8ad327c5b3a03fe6876f8e.zip tcl-ce16019300e66b466f8ad327c5b3a03fe6876f8e.tar.gz tcl-ce16019300e66b466f8ad327c5b3a03fe6876f8e.tar.bz2 |
* generic/tclBasic.c: Refactored and renamed the routines
* generic/tclCkalloc.c: TclObjPrintf, TclFormatObj, and
* generic/tclCmdAH.c: TclFormatToErrorInfo to a new set of
* generic/tclCmdIL.c: routines TclAppendPrintfToObj,
* generic/tclCmdMZ.c: TclAppendFormatToObj, TclObjPrintf, and
* generic/tclDictObj.c: TclObjFormat, with the intent of making
* generic/tclExecute.c: the latter list, plus TclAppendLimitedToObj
* generic/tclIORChan.c: and TclAppendObjToErrorInfo, public via
* generic/tclIOUtil.c: a revised TIP 270.
* generic/tclInt.h:
* generic/tclMain.c:
* generic/tclNamesp.c:
* generic/tclParseExpr.c:
* generic/tclPkg.c:
* generic/tclProc.c:
* generic/tclStringObj.c:
* generic/tclTimer.c:
* generic/tclUtil.c:
* unix/tclUnixFCmd.c:
Diffstat (limited to 'generic/tclNamesp.c')
-rw-r--r-- | generic/tclNamesp.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c index bbb8a7b..412e0c7 100644 --- a/generic/tclNamesp.c +++ b/generic/tclNamesp.c @@ -22,7 +22,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclNamesp.c,v 1.113 2006/10/31 15:23:41 msofer Exp $ + * RCS: @(#) $Id: tclNamesp.c,v 1.114 2006/10/31 20:19:45 dgp Exp $ */ #include "tclInt.h" @@ -3454,10 +3454,10 @@ NamespaceEvalCmd( int limit = 200; int overflow = (length > limit); - TclFormatToErrorInfo(interp, + TclAppendObjToErrorInfo(interp, TclObjPrintf(NULL, "\n (in namespace eval \"%.*s%s\" script line %d)", (overflow ? limit : length), namespacePtr->fullName, - (overflow ? "..." : ""), interp->errorLine); + (overflow ? "..." : ""), interp->errorLine)); } /* @@ -3872,10 +3872,10 @@ NamespaceInscopeCmd( int limit = 200; int overflow = (length > limit); - TclFormatToErrorInfo(interp, + TclAppendObjToErrorInfo(interp, TclObjPrintf(NULL, "\n (in namespace inscope \"%.*s%s\" script line %d)", (overflow ? limit : length), namespacePtr->fullName, - (overflow ? "..." : ""), interp->errorLine); + (overflow ? "..." : ""), interp->errorLine)); } /* @@ -4602,12 +4602,8 @@ NamespaceUpvarCmd( /* * The namespace does not exist, leave an error message. */ - - Tcl_Obj *resPtr; - - TclNewObj(resPtr); - TclFormatObj(NULL, resPtr, "namespace \"%s\" does not exist", objv[2]); - Tcl_SetObjResult(interp, resPtr); + Tcl_SetObjResult(interp, TclObjFormat(NULL, + "namespace \"%s\" does not exist", objv[2])); return TCL_ERROR; } @@ -6997,10 +6993,10 @@ Tcl_LogCommandInfo( } overflow = (length > limit); - TclFormatToErrorInfo(interp, "\n %s\n\"%.*s%s\"", - ((iPtr->errorInfo == NULL) + TclAppendObjToErrorInfo(interp, TclObjPrintf(NULL, + "\n %s\n\"%.*s%s\"", ((iPtr->errorInfo == NULL) ? "while executing" : "invoked from within"), - (overflow ? limit : length), command, (overflow ? "..." : "")); + (overflow ? limit : length), command, (overflow ? "..." : ""))); varPtr = TclObjLookupVar(interp, iPtr->eiVar, NULL, TCL_GLOBAL_ONLY, NULL, 0, 0, &arrayPtr); |