summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2011-08-05 15:23:55 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2011-08-05 15:23:55 (GMT)
commit86876436a44b247ec6423fbead92b7c3ce8a2032 (patch)
tree8d196c86a7bd506d332c9e4b0da126e6f2ed45fd /generic/tclBasic.c
parent6c25700250fe041510e2332ba954737b21f3146d (diff)
downloadtcl-86876436a44b247ec6423fbead92b7c3ce8a2032.zip
tcl-86876436a44b247ec6423fbead92b7c3ce8a2032.tar.gz
tcl-86876436a44b247ec6423fbead92b7c3ce8a2032.tar.bz2
Use Tcl_PrintfObj to generate more (complex) error messages.
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index c46510c..a44d736 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -3645,12 +3645,8 @@ Tcl_GetMathFuncInfo(
*/
if (cmdPtr == NULL) {
- Tcl_Obj *message;
-
- TclNewLiteralStringObj(message, "unknown math function \"");
- Tcl_AppendToObj(message, name, -1);
- Tcl_AppendToObj(message, "\"", 1);
- Tcl_SetObjResult(interp, message);
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "unknown math function \"%s\"", name));
Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "MATHFUNC", name, NULL);
*numArgsPtr = -1;
*argTypesPtr = NULL;