summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-01-25 11:48:29 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-01-25 11:48:29 (GMT)
commit1a19e1f67d4039692837657d71be3d35b40a9662 (patch)
tree507709c949d3fd2b5d934023e4e39366cae322df /generic
parentee29bbd769ed711e5e7faa7c838d23a8092cc3d1 (diff)
downloadtcl-1a19e1f67d4039692837657d71be3d35b40a9662.zip
tcl-1a19e1f67d4039692837657d71be3d35b40a9662.tar.gz
tcl-1a19e1f67d4039692837657d71be3d35b40a9662.tar.bz2
Eliminate some unneeded usages of Tcl_SetResult, Tcl_AddObjErrorInfo
Fix "make test-packages" on cygwin
Diffstat (limited to 'generic')
-rw-r--r--generic/tclAssembly.c9
-rw-r--r--generic/tclEnsemble.c2
-rw-r--r--generic/tclExecute.c4
-rw-r--r--generic/tclOO.c2
-rw-r--r--generic/tclResult.c2
-rw-r--r--generic/tclThreadTest.c2
-rw-r--r--generic/tclTrace.c2
-rw-r--r--generic/tclVar.c4
8 files changed, 13 insertions, 14 deletions
diff --git a/generic/tclAssembly.c b/generic/tclAssembly.c
index 7833105..99bdf43 100644
--- a/generic/tclAssembly.c
+++ b/generic/tclAssembly.c
@@ -798,12 +798,11 @@ TclNRAssembleObjCmd(
if (codePtr == NULL) {
Tcl_AddErrorInfo(interp, "\n (\"");
- Tcl_AddErrorInfo(interp, Tcl_GetString(objv[0]));
+ Tcl_AppendObjToErrorInfo(interp, objv[0]);
Tcl_AddErrorInfo(interp, "\" body, line ");
backtrace = Tcl_NewIntObj(Tcl_GetErrorLine(interp));
Tcl_IncrRefCount(backtrace);
- Tcl_AddErrorInfo(interp, Tcl_GetString(backtrace));
- Tcl_DecrRefCount(backtrace);
+ Tcl_AppendObjToErrorInfo(interp, backtrace);
Tcl_AddErrorInfo(interp, ")");
return TCL_ERROR;
}
@@ -4270,11 +4269,11 @@ AddBasicBlockRangeToErrorInfo(
Tcl_AddErrorInfo(interp, "\n in assembly code between lines ");
lineNo = Tcl_NewIntObj(bbPtr->startLine);
Tcl_IncrRefCount(lineNo);
- Tcl_AddErrorInfo(interp, Tcl_GetString(lineNo));
+ Tcl_AppendObjToErrorInfo(interp, lineNo);
Tcl_AddErrorInfo(interp, " and ");
if (bbPtr->successor1 != NULL) {
Tcl_SetIntObj(lineNo, bbPtr->successor1->startLine);
- Tcl_AddErrorInfo(interp, Tcl_GetString(lineNo));
+ Tcl_AppendObjToErrorInfo(interp, lineNo);
} else {
Tcl_AddErrorInfo(interp, "end of assembly code");
}
diff --git a/generic/tclEnsemble.c b/generic/tclEnsemble.c
index 88de9f3..f392cad 100644
--- a/generic/tclEnsemble.c
+++ b/generic/tclEnsemble.c
@@ -2196,7 +2196,7 @@ EnsembleUnknownCallback(
}
Tcl_AddErrorInfo(interp, "\n result of "
"ensemble unknown subcommand handler: ");
- Tcl_AddErrorInfo(interp, TclGetString(unknownCmd));
+ Tcl_AppendObjToErrorInfo(interp, unknownCmd);
Tcl_SetErrorCode(interp, "TCL", "ENSEMBLE", "UNKNOWN_RESULT",
NULL);
} else {
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 978d026..c2cef2a 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -3464,8 +3464,8 @@ TEBCresume(
varPtr = TclObjLookupVarEx(interp, objPtr, part2Ptr,
TCL_LEAVE_ERR_MSG, "read", 1, 1, &arrayPtr);
if (!varPtr) {
- Tcl_AddObjErrorInfo(interp,
- "\n (reading value of variable to increment)", -1);
+ Tcl_AddErrorInfo(interp,
+ "\n (reading value of variable to increment)");
TRACE_APPEND(("ERROR: %.30s\n", O2S(Tcl_GetObjResult(interp))));
Tcl_DecrRefCount(incrPtr);
goto gotError;
diff --git a/generic/tclOO.c b/generic/tclOO.c
index d6d2d6a..cb22de6 100644
--- a/generic/tclOO.c
+++ b/generic/tclOO.c
@@ -843,7 +843,7 @@ ObjectRenamedTrace(
result = Tcl_NRCallObjProc(interp, TclOOInvokeContext,
contextPtr, 0, NULL);
if (result != TCL_OK) {
- Tcl_BackgroundError(interp);
+ Tcl_BackgroundException(interp, result);
}
Tcl_RestoreInterpState(interp, state);
TclOODeleteContext(contextPtr);
diff --git a/generic/tclResult.c b/generic/tclResult.c
index 9707f20..07f6819 100644
--- a/generic/tclResult.c
+++ b/generic/tclResult.c
@@ -1587,7 +1587,7 @@ Tcl_GetReturnOptions(
}
if (result == TCL_ERROR) {
- Tcl_AddObjErrorInfo(interp, "", -1);
+ Tcl_AddErrorInfo(interp, "");
Tcl_DictObjPut(NULL, options, keys[KEY_ERRORSTACK], iPtr->errorStack);
}
if (iPtr->errorCode) {
diff --git a/generic/tclThreadTest.c b/generic/tclThreadTest.c
index b90e33d..1115ff0 100644
--- a/generic/tclThreadTest.c
+++ b/generic/tclThreadTest.c
@@ -926,7 +926,7 @@ ThreadSend(
ckfree(resultPtr->errorInfo);
}
}
- Tcl_SetResult(interp, resultPtr->result, TCL_DYNAMIC);
+ Tcl_AppendResult(interp, resultPtr->result, NULL);
Tcl_ConditionFinalize(&resultPtr->done);
code = resultPtr->code;
diff --git a/generic/tclTrace.c b/generic/tclTrace.c
index 519f201..0f297a4 100644
--- a/generic/tclTrace.c
+++ b/generic/tclTrace.c
@@ -1322,7 +1322,7 @@ TraceCommandProc(
Tcl_DStringLength(&cmd), 0);
if (code != TCL_OK) {
/* We ignore errors in these traced commands */
- /*** QUESTION: Use Tcl_BackgroundError(interp); instead? ***/
+ /*** QUESTION: Use Tcl_BackgroundException(interp, code); instead? ***/
}
Tcl_DStringFree(&cmd);
}
diff --git a/generic/tclVar.c b/generic/tclVar.c
index 9b8527c..2d1479d 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -2036,8 +2036,8 @@ TclIncrObjVar2(
varPtr = TclObjLookupVarEx(interp, part1Ptr, part2Ptr, flags, "read",
1, 1, &arrayPtr);
if (varPtr == NULL) {
- Tcl_AddObjErrorInfo(interp,
- "\n (reading value of variable to increment)", -1);
+ Tcl_AddErrorInfo(interp,
+ "\n (reading value of variable to increment)");
return NULL;
}
return TclPtrIncrObjVar(interp, varPtr, arrayPtr, part1Ptr, part2Ptr,