summaryrefslogtreecommitdiffstats
path: root/generic/tclProc.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2006-11-15 20:08:41 (GMT)
committerdgp <dgp@users.sourceforge.net>2006-11-15 20:08:41 (GMT)
commitf5e6dc061f04d3923e3e9098ee796d212209eff4 (patch)
tree752af501223a220be61c59c71f29857e4269dcd2 /generic/tclProc.c
parent957788b87ab7599dee6ac939d75fe8ae71ab91cf (diff)
downloadtcl-f5e6dc061f04d3923e3e9098ee796d212209eff4.zip
tcl-f5e6dc061f04d3923e3e9098ee796d212209eff4.tar.gz
tcl-f5e6dc061f04d3923e3e9098ee796d212209eff4.tar.bz2
TIP#270 IMPLEMENTATION
* generic/tcl.decls: New public routines Tcl_ObjPrintf, * generic/tclStringObj.c: Tcl_AppendObjToErrorInfo, Tcl_Format, * generic/tclInt.h: Tcl_AppendLimitedToObj, Tcl_AppendFormatToObj and Tcl_AppendPrintfToObj. Former internal versions removed. * generic/tclDecls.h: make genstubs * generic/tclStubInit.c: * generic/tclBasic.c: Updated callers. * generic/tclCkalloc.c: * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclCompExpr.c: * generic/tclCompile.c: * generic/tclDictObj.c: * generic/tclExecute.c: * generic/tclIORChan.c: * generic/tclIOUtil.c: * generic/tclMain.c: * generic/tclNamesp.c: * generic/tclObj.c: * generic/tclPkg.c: * generic/tclProc.c: * generic/tclStrToD.c: * generic/tclTimer.c: * generic/tclUtil.c: * unix/tclUnixFCmd.c:
Diffstat (limited to 'generic/tclProc.c')
-rw-r--r--generic/tclProc.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/generic/tclProc.c b/generic/tclProc.c
index 3a1121d..c0a3549 100644
--- a/generic/tclProc.c
+++ b/generic/tclProc.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: tclProc.c,v 1.106 2006/11/13 08:23:09 das Exp $
+ * RCS: @(#) $Id: tclProc.c,v 1.107 2006/11/15 20:08:45 dgp Exp $
*/
#include "tclInt.h"
@@ -369,7 +369,7 @@ TclCreateProc(
if (precompiled) {
if (numArgs > procPtr->numArgs) {
- Tcl_SetObjResult(interp, TclObjPrintf(
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"procedure \"%s\": arg list contains %d entries, "
"precompiled header expects %d", procName, numArgs,
procPtr->numArgs));
@@ -458,7 +458,7 @@ TclCreateProc(
!= (VAR_SCALAR | VAR_ARGUMENT))
|| (localPtr->defValuePtr == NULL && fieldCount == 2)
|| (localPtr->defValuePtr != NULL && fieldCount != 2)) {
- Tcl_SetObjResult(interp, TclObjPrintf(
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"procedure \"%s\": formal parameter %d is "
"inconsistent with precompiled body", procName, i));
ckfree((char *) fieldValues);
@@ -475,7 +475,7 @@ TclCreateProc(
&tmpLength);
if ((valueLength != tmpLength) ||
strncmp(fieldValues[1], tmpPtr, (size_t) tmpLength)) {
- Tcl_SetObjResult(interp, TclObjPrintf(
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"procedure \"%s\": formal parameter \"%s\" has "
"default value inconsistent with precompiled body",
procName, fieldValues[0]));
@@ -839,7 +839,7 @@ Tcl_UplevelObjCmd(
result = Tcl_EvalObjEx(interp, objPtr, TCL_EVAL_DIRECT);
}
if (result == TCL_ERROR) {
- TclAppendObjToErrorInfo(interp, TclObjPrintf(
+ Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf(
"\n (\"uplevel\" body line %d)", interp->errorLine));
}
@@ -1600,7 +1600,7 @@ ProcCompileProc(
Tcl_IncrRefCount(message);
Tcl_AppendStringsToObj(message, description, " \"", NULL);
- TclAppendLimitedToObj(message, procName, -1, 50, NULL);
+ Tcl_AppendLimitedToObj(message, procName, -1, 50, NULL);
fprintf(stdout, "%s\"\n", TclGetString(message));
Tcl_DecrRefCount(message);
}
@@ -1692,7 +1692,7 @@ ProcCompileProc(
int limit = 50;
int overflow = (length > limit);
- TclAppendObjToErrorInfo(interp, TclObjPrintf(
+ Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf(
"\n (compiling %s \"%.*s%s\", line %d)",
description, (overflow ? limit : length), procName,
(overflow ? "..." : ""), interp->errorLine));
@@ -1739,7 +1739,7 @@ MakeProcError(
const char *procName = Tcl_GetStringFromObj(procNameObj, &nameLen);
overflow = (nameLen > limit);
- TclAppendObjToErrorInfo(interp, TclObjPrintf(
+ Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf(
"\n (procedure \"%.*s%s\" line %d)",
(overflow ? limit : nameLen), procName,
(overflow ? "..." : ""), interp->errorLine));
@@ -2077,7 +2077,7 @@ SetLambdaFromAny(
if (TclCreateProc(interp, /*ignored nsPtr*/ NULL, name, argsPtr,
bodyPtr, &procPtr) != TCL_OK) {
- TclAppendObjToErrorInfo(interp, TclObjPrintf(
+ Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf(
"\n (parsing lambda expression \"%s\")", name));
return TCL_ERROR;
}
@@ -2267,7 +2267,7 @@ MakeLambdaError(
const char *procName = Tcl_GetStringFromObj(procNameObj, &nameLen);
overflow = (nameLen > limit);
- TclAppendObjToErrorInfo(interp, TclObjPrintf(
+ Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf(
"\n (lambda term \"%.*s%s\" line %d)",
(overflow ? limit : nameLen), procName,
(overflow ? "..." : ""), interp->errorLine));