summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdAH.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2006-11-02 16:57:53 (GMT)
committerdgp <dgp@users.sourceforge.net>2006-11-02 16:57:53 (GMT)
commitee75480f2f9483654c8f665acd984569f3234ca8 (patch)
tree2310e44be176ea7118c46442e8d83a1fb9c699ec /generic/tclCmdAH.c
parentd21c1ef27faf5fb3983ceaa6fb2f9e4d92fd79fc (diff)
downloadtcl-ee75480f2f9483654c8f665acd984569f3234ca8.zip
tcl-ee75480f2f9483654c8f665acd984569f3234ca8.tar.gz
tcl-ee75480f2f9483654c8f665acd984569f3234ca8.tar.bz2
* generic/tclCmdAH.c: Further revisions to produce the routines
* generic/tclInt.h: TclFormat() and TclAppendFormatToObj() that * generic/tclNamesp.c: accept (objc, objv) arguments rather than * generic/tclStringObj.c: any varargs stuff.
Diffstat (limited to 'generic/tclCmdAH.c')
-rw-r--r--generic/tclCmdAH.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c
index 1ed975f..27cdcff 100644
--- a/generic/tclCmdAH.c
+++ b/generic/tclCmdAH.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCmdAH.c,v 1.78 2006/11/02 15:58:04 dgp Exp $
+ * RCS: @(#) $Id: tclCmdAH.c,v 1.79 2006/11/02 16:57:54 dgp Exp $
*/
#include "tclInt.h"
@@ -1881,15 +1881,11 @@ Tcl_FormatObjCmd(dummy, interp, objc, objv)
return TCL_ERROR;
}
- resultPtr = Tcl_NewObj();
- Tcl_IncrRefCount(resultPtr);
- if (TclAppendFormattedObjs(interp, resultPtr, TclGetString(objv[1]),
- objc-2, objv+2) != TCL_OK) {
- Tcl_DecrRefCount(resultPtr);
+ resultPtr = TclFormat(interp, TclGetString(objv[1]), objc-2, objv+2);
+ if (resultPtr == NULL) {
return TCL_ERROR;
}
Tcl_SetObjResult(interp, resultPtr);
- Tcl_DecrRefCount(resultPtr);
return TCL_OK;
}