summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2009-11-16 18:00:11 (GMT)
committerdgp <dgp@users.sourceforge.net>2009-11-16 18:00:11 (GMT)
commitbce1984cd71b25499760b589bfe695ffb6213d83 (patch)
tree26a12433839436b7c432fcfc0b29c7557ad65873 /generic
parent3ffda83a5b3d9b03fa4bad1e5384919a46adf47a (diff)
downloadtcl-bce1984cd71b25499760b589bfe695ffb6213d83.zip
tcl-bce1984cd71b25499760b589bfe695ffb6213d83.tar.gz
tcl-bce1984cd71b25499760b589bfe695ffb6213d83.tar.bz2
Revert mistaken commit
Diffstat (limited to 'generic')
-rw-r--r--generic/tclBasic.c8
-rw-r--r--generic/tclCmdIL.c57
-rw-r--r--generic/tclInt.h4
-rw-r--r--generic/tclNamesp.c36
-rw-r--r--generic/tclResult.c9
5 files changed, 7 insertions, 107 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index c8ae5ae..cd7bd25 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -16,7 +16,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclBasic.c,v 1.408 2009/11/16 17:38:08 ferrieux Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.409 2009/11/16 18:00:11 dgp Exp $
*/
#include "tclInt.h"
@@ -530,9 +530,6 @@ Tcl_CreateInterp(void)
iPtr->errorInfo = NULL;
TclNewLiteralStringObj(iPtr->eiVar, "::errorInfo");
Tcl_IncrRefCount(iPtr->eiVar);
- iPtr->errorStack = Tcl_NewListObj(0, NULL);
- Tcl_IncrRefCount(iPtr->errorStack);
- iPtr->resetErrorStack = 1;
iPtr->errorCode = NULL;
TclNewLiteralStringObj(iPtr->ecVar, "::errorCode");
Tcl_IncrRefCount(iPtr->ecVar);
@@ -1473,7 +1470,6 @@ DeleteInterpProc(
Tcl_DecrRefCount(iPtr->errorInfo);
iPtr->errorInfo = NULL;
}
- Tcl_DecrRefCount(iPtr->errorStack);
if (iPtr->returnOpts) {
Tcl_DecrRefCount(iPtr->returnOpts);
}
@@ -8824,7 +8820,5 @@ TclInfoCoroutineCmd(
* mode: c
* c-basic-offset: 4
* fill-column: 78
- * tab-width: 8
- * indent-tabs-mode: nil
* End:
*/
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index 9c89ae4..39afc83 100644
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.c
@@ -16,7 +16,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCmdIL.c,v 1.172 2009/11/16 17:38:08 ferrieux Exp $
+ * RCS: @(#) $Id: tclCmdIL.c,v 1.173 2009/11/16 18:00:11 dgp Exp $
*/
#include "tclInt.h"
@@ -118,9 +118,6 @@ static int InfoCompleteCmd(ClientData dummy, Tcl_Interp *interp,
int objc, Tcl_Obj *const objv[]);
static int InfoDefaultCmd(ClientData dummy, Tcl_Interp *interp,
int objc, Tcl_Obj *const objv[]);
-/* TIP #348 - New 'info' subcommand 'errorstack' */
-static int InfoErrorStackCmd(ClientData dummy, Tcl_Interp *interp,
- int objc, Tcl_Obj *const objv[]);
/* TIP #280 - New 'info' subcommand 'frame' */
static int InfoFrameCmd(ClientData dummy, Tcl_Interp *interp,
int objc, Tcl_Obj *const objv[]);
@@ -167,7 +164,6 @@ static const EnsembleImplMap defaultInfoMap[] = {
{"complete", InfoCompleteCmd, NULL},
{"coroutine", TclInfoCoroutineCmd, NULL},
{"default", InfoDefaultCmd, NULL},
- {"errorstack", InfoErrorStackCmd, NULL},
{"exists", TclInfoExistsCmd, TclCompileInfoExistsCmd},
{"frame", InfoFrameCmd, NULL},
{"functions", InfoFunctionsCmd, NULL},
@@ -1021,55 +1017,6 @@ InfoDefaultCmd(
/*
*----------------------------------------------------------------------
*
- * InfoErrorStackCmd --
- *
- * Called to implement the "info errorstack" command that returns information
- * about the last error's call stack. Handles the following syntax:
- *
- * info errorstack ?interp?
- *
- * Results:
- * Returns TCL_OK if successful and TCL_ERROR if there is an error.
- *
- * Side effects:
- * Returns a result in the interpreter's result object. If there is an
- * error, the result is an error message.
- *
- *----------------------------------------------------------------------
- */
-
-static int
-InfoErrorStackCmd(
- ClientData dummy, /* Not used. */
- Tcl_Interp *interp, /* Current interpreter. */
- int objc, /* Number of arguments. */
- Tcl_Obj *const objv[]) /* Argument objects. */
-{
- Tcl_Interp *target;
- Interp *iPtr;
-
- if ((objc != 1) && (objc != 2)) {
- Tcl_WrongNumArgs(interp, 1, objv, "?interp?");
- return TCL_ERROR;
- }
-
- target = interp;
- if (objc == 2) {
- target = Tcl_GetSlave(interp, Tcl_GetString(objv[1]));
- if (target == NULL) {
- return TCL_ERROR;
- }
- }
-
- iPtr = (Interp *) target;
- Tcl_SetObjResult(interp, iPtr->errorStack);
-
- return TCL_OK;
-}
-
-/*
- *----------------------------------------------------------------------
- *
* TclInfoExistsCmd --
*
* Called to implement the "info exists" command that determines whether
@@ -4441,7 +4388,5 @@ SelectObjFromSublist(
* mode: c
* c-basic-offset: 4
* fill-column: 78
- * tab-width: 8
- * indent-tabs-mode: nil
* End:
*/
diff --git a/generic/tclInt.h b/generic/tclInt.h
index be536a9..eefe5f6 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -15,7 +15,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclInt.h,v 1.446 2009/11/16 17:38:08 ferrieux Exp $
+ * RCS: @(#) $Id: tclInt.h,v 1.447 2009/11/16 18:00:11 dgp Exp $
*/
#ifndef _TCLINT
@@ -1895,8 +1895,6 @@ typedef struct Interp {
Tcl_Obj *eiVar; /* cached ref to ::errorInfo variable. */
Tcl_Obj *errorCode; /* errorCode value (now as a Tcl_Obj). */
Tcl_Obj *ecVar; /* cached ref to ::errorInfo variable. */
- Tcl_Obj *errorStack; /* [info errorstack] value (as a Tcl_Obj). */
- int resetErrorStack; /* controls cleaning up of ::errorStack */
int returnLevel; /* [return -level] parameter. */
/*
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c
index 2b9b508..5d08bcb 100644
--- a/generic/tclNamesp.c
+++ b/generic/tclNamesp.c
@@ -23,7 +23,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclNamesp.c,v 1.194 2009/11/16 17:38:09 ferrieux Exp $
+ * RCS: @(#) $Id: tclNamesp.c,v 1.195 2009/11/16 18:00:11 dgp Exp $
*/
#include "tclInt.h"
@@ -7574,7 +7574,7 @@ Tcl_LogCommandInfo(
{
register const char *p;
Interp *iPtr = (Interp *) interp;
- int overflow, limit = 150, len;
+ int overflow, limit = 150;
Var *varPtr, *arrayPtr;
if (iPtr->flags & ERR_ALREADY_LOGGED) {
@@ -7633,36 +7633,6 @@ Tcl_LogCommandInfo(
TCL_GLOBAL_ONLY);
}
}
-
- /*
- * TIP #348
- */
-
- if (Tcl_IsShared(iPtr->errorStack)) {
- Tcl_Obj *newObj;
-
- newObj = Tcl_DuplicateObj(iPtr->errorStack);
- Tcl_DecrRefCount(iPtr->errorStack);
- Tcl_IncrRefCount(newObj);
- iPtr->errorStack = newObj;
- }
- Tcl_ListObjLength(interp, iPtr->errorStack, &len);
- if (iPtr->resetErrorStack) {
- iPtr->resetErrorStack = 0;
- /* reset while keeping the list intrep as much as possible */
- Tcl_ListObjReplace(interp, iPtr->errorStack, 0, len, 0, NULL);
- len=0;
- }
- if (iPtr->varFramePtr != iPtr->rootFramePtr) {
- Tcl_Obj *listPtr;
- int result;
- listPtr=Tcl_NewListObj(iPtr->varFramePtr->objc,
- iPtr->varFramePtr->objv);
- result = Tcl_ListObjReplace(interp, iPtr->errorStack, len, 0, 1, &listPtr);
- if (result != TCL_OK) {
- Tcl_DecrRefCount(listPtr);
- }
- }
}
/*
@@ -7670,7 +7640,5 @@ Tcl_LogCommandInfo(
* mode: c
* c-basic-offset: 4
* fill-column: 78
- * tab-width: 8
- * indent-tabs-mode: nil
* End:
*/
diff --git a/generic/tclResult.c b/generic/tclResult.c
index 3d6284e..9f2ec92 100644
--- a/generic/tclResult.c
+++ b/generic/tclResult.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclResult.c,v 1.55 2009/11/16 17:38:09 ferrieux Exp $
+ * RCS: @(#) $Id: tclResult.c,v 1.56 2009/11/16 18:00:11 dgp Exp $
*/
#include "tclInt.h"
@@ -19,7 +19,7 @@
enum returnKeys {
KEY_CODE, KEY_ERRORCODE, KEY_ERRORINFO, KEY_ERRORLINE,
- KEY_LEVEL, KEY_OPTIONS, KEY_ERRORSTACK, KEY_LAST
+ KEY_LEVEL, KEY_OPTIONS, KEY_LAST
};
/*
@@ -922,7 +922,6 @@ Tcl_ResetResult(
Tcl_DecrRefCount(iPtr->errorInfo);
iPtr->errorInfo = NULL;
}
- iPtr->resetErrorStack = 1;
iPtr->returnLevel = 1;
iPtr->returnCode = TCL_OK;
if (iPtr->returnOpts) {
@@ -1159,7 +1158,6 @@ GetKeys(void)
TclNewLiteralStringObj(keys[KEY_ERRORCODE], "-errorcode");
TclNewLiteralStringObj(keys[KEY_ERRORINFO], "-errorinfo");
TclNewLiteralStringObj(keys[KEY_ERRORLINE], "-errorline");
- TclNewLiteralStringObj(keys[KEY_ERRORSTACK],"-errorstack");
TclNewLiteralStringObj(keys[KEY_LEVEL], "-level");
TclNewLiteralStringObj(keys[KEY_OPTIONS], "-options");
@@ -1505,7 +1503,6 @@ Tcl_GetReturnOptions(
Tcl_DictObjPut(NULL, options, keys[KEY_ERRORLINE],
Tcl_NewIntObj(iPtr->errorLine));
}
- Tcl_DictObjPut(NULL, options, keys[KEY_ERRORSTACK], iPtr->errorStack);
return options;
}
@@ -1627,7 +1624,5 @@ Tcl_TransferResult(
* mode: c
* c-basic-offset: 4
* fill-column: 78
- * tab-width: 8
- * indent-tabs-mode: nil
* End:
*/