summaryrefslogtreecommitdiffstats
path: root/generic/tclTrace.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-08-03 10:56:28 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-08-03 10:56:28 (GMT)
commit4152a1cc08547b251509c18405d318433f5ece2e (patch)
tree75be1366adc438a7d2ef0f75fc7c2ffe414d7872 /generic/tclTrace.c
parent3546e128c0c379f71d6fdf6678ad19cd9d0a0265 (diff)
downloadtcl-4152a1cc08547b251509c18405d318433f5ece2e.zip
tcl-4152a1cc08547b251509c18405d318433f5ece2e.tar.gz
tcl-4152a1cc08547b251509c18405d318433f5ece2e.tar.bz2
converting to using Tcl_Obj API for error message generation; part done
Diffstat (limited to 'generic/tclTrace.c')
-rw-r--r--generic/tclTrace.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/generic/tclTrace.c b/generic/tclTrace.c
index 529c38a..3888549 100644
--- a/generic/tclTrace.c
+++ b/generic/tclTrace.c
@@ -434,9 +434,9 @@ TraceExecutionObjCmd(
return result;
}
if (listLen == 0) {
- Tcl_SetResult(interp, "bad operation list \"\": must be "
- "one or more of enter, leave, enterstep, or leavestep",
- TCL_STATIC);
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(
+ "bad operation list \"\": must be one or more of"
+ " enter, leave, enterstep, or leavestep", -1));
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "TRACE", "NOOPS",
NULL);
return TCL_ERROR;
@@ -677,8 +677,9 @@ TraceCommandObjCmd(
return result;
}
if (listLen == 0) {
- Tcl_SetResult(interp, "bad operation list \"\": must be "
- "one or more of delete or rename", TCL_STATIC);
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(
+ "bad operation list \"\": must be one or more of"
+ " delete or rename", -1));
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "TRACE", "NOOPS",
NULL);
return TCL_ERROR;
@@ -875,8 +876,9 @@ TraceVariableObjCmd(
return result;
}
if (listLen == 0) {
- Tcl_SetResult(interp, "bad operation list \"\": must be "
- "one or more of array, read, unset, or write", TCL_STATIC);
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(
+ "bad operation list \"\": must be one or more of"
+ " array, read, unset, or write", -1));
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "TRACE", "NOOPS",
NULL);
return TCL_ERROR;
@@ -2715,7 +2717,8 @@ TclCallVarTraces(
if (disposeFlags & TCL_TRACE_RESULT_OBJECT) {
Tcl_SetObjResult((Tcl_Interp *)iPtr, (Tcl_Obj *) result);
} else {
- Tcl_SetResult((Tcl_Interp *)iPtr, result, TCL_STATIC);
+ Tcl_SetObjResult((Tcl_Interp *)iPtr,
+ Tcl_NewStringObj(result, -1));
}
Tcl_AddErrorInfo((Tcl_Interp *)iPtr, "");