summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c105
1 files changed, 1 insertions, 104 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index d55faeb..a66b8b2 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -503,10 +503,6 @@ Tcl_CreateInterp(void)
iPtr = ckalloc(sizeof(Interp));
interp = (Tcl_Interp *) iPtr;
-#if 0
- iPtr->result = iPtr->resultSpace;
- iPtr->freeProc = NULL;
-#endif
iPtr->errorLine = 0;
iPtr->objResultPtr = Tcl_NewObj();
Tcl_IncrRefCount(iPtr->objResultPtr);
@@ -562,12 +558,6 @@ Tcl_CreateInterp(void)
iPtr->rootFramePtr = NULL; /* Initialise as soon as :: is available */
iPtr->lookupNsPtr = NULL;
-#if 0
- iPtr->appendResult = NULL;
- iPtr->appendAvl = 0;
- iPtr->appendUsed = 0;
-#endif
-
Tcl_InitHashTable(&iPtr->packageTable, TCL_STRING_KEYS);
iPtr->packageUnknown = NULL;
@@ -595,9 +585,6 @@ Tcl_CreateInterp(void)
iPtr->emptyObjPtr = Tcl_NewObj();
/* Another empty object. */
Tcl_IncrRefCount(iPtr->emptyObjPtr);
-#if 0
- iPtr->resultSpace[0] = 0;
-#endif
iPtr->threadId = Tcl_GetCurrentThread();
/* TIP #378 */
@@ -1499,9 +1486,6 @@ DeleteInterpProc(
*/
Tcl_FreeResult(interp);
-#if 0
- iPtr->result = NULL;
-#endif
Tcl_DecrRefCount(iPtr->objResultPtr);
iPtr->objResultPtr = NULL;
Tcl_DecrRefCount(iPtr->ecVar);
@@ -1523,12 +1507,6 @@ DeleteInterpProc(
if (iPtr->returnOpts) {
Tcl_DecrRefCount(iPtr->returnOpts);
}
-#if 0
- if (iPtr->appendResult != NULL) {
- ckfree(iPtr->appendResult);
- iPtr->appendResult = NULL;
- }
-#endif
TclFreePackageInfo(iPtr);
while (iPtr->tracePtr != NULL) {
Tcl_DeleteTrace((Tcl_Interp *) iPtr, (Tcl_Trace) iPtr->tracePtr);
@@ -2435,15 +2413,6 @@ TclInvokeObjectCommand(
cmdPtr->objClientData, argc, objv);
}
-#if 0
- /*
- * Move the interpreter's object result to the string result, then reset
- * the object result.
- */
-
- (void) Tcl_GetStringResult(interp);
-#endif
-
/*
* Decrement the ref counts for the argument objects created above, then
* free the objv array if malloc'ed storage was used.
@@ -4345,26 +4314,9 @@ TclNRRunCallbacks(
/* All callbacks down to rootPtr not inclusive
* are to be run. */
{
-/* Interp *iPtr = (Interp *) interp;*/
NRE_callback *callbackPtr;
Tcl_NRPostProc *procPtr;
-#if 0
- /*
- * If the interpreter has a non-empty string result, the result object is
- * either empty or stale because some function set interp->result
- * directly. If so, move the string result to the result object, then
- * reset the string result.
- *
- * This only needs to be done for the first item in the list: all other
- * are for NR function calls, and those are Tcl_Obj based.
- */
-
- if (*(iPtr->result) != 0) {
- (void) Tcl_GetObjResult(interp);
- }
-#endif
-
while (TOP_CB(interp) != rootPtr) {
callbackPtr = TOP_CB(interp);
procPtr = callbackPtr->procPtr;
@@ -5842,18 +5794,6 @@ Tcl_Eval(
* previous call to Tcl_CreateInterp). */
const char *script) /* Pointer to TCL command to execute. */
{
-#if 0
- int code = Tcl_EvalEx(interp, script, -1, 0);
-
- /*
- * For backwards compatibility with old C code that predates the object
- * system in Tcl 8.0, we have to mirror the object result back into the
- * string result (some callers may expect it there).
- */
-
- (void) Tcl_GetStringResult(interp);
- return code;
-#endif
return Tcl_EvalEx(interp, script, -1, 0);
}
@@ -6352,11 +6292,6 @@ Tcl_ExprLong(
Tcl_IncrRefCount(exprPtr);
result = Tcl_ExprLongObj(interp, exprPtr, ptr);
Tcl_DecrRefCount(exprPtr);
-#if 0
- if (result != TCL_OK) {
- (void) Tcl_GetStringResult(interp);
- }
-#endif
}
return result;
}
@@ -6383,11 +6318,6 @@ Tcl_ExprDouble(
result = Tcl_ExprDoubleObj(interp, exprPtr, ptr);
Tcl_DecrRefCount(exprPtr);
/* Discard the expression object. */
-#if 0
- if (result != TCL_OK) {
- (void) Tcl_GetStringResult(interp);
- }
-#endif
}
return result;
}
@@ -6413,16 +6343,6 @@ Tcl_ExprBoolean(
Tcl_IncrRefCount(exprPtr);
result = Tcl_ExprBooleanObj(interp, exprPtr, ptr);
Tcl_DecrRefCount(exprPtr);
-#if 0
- if (result != TCL_OK) {
- /*
- * Move the interpreter's object result to the string result, then
- * reset the object result.
- */
-
- (void) Tcl_GetStringResult(interp);
- }
-#endif
return result;
}
}
@@ -6747,13 +6667,6 @@ Tcl_ExprString(
Tcl_DecrRefCount(resultPtr);
}
}
-#if 0
- /*
- * Force the string rep of the interp result.
- */
-
- (void) Tcl_GetStringResult(interp);
-#endif
return code;
}
@@ -6857,23 +6770,7 @@ Tcl_AddObjErrorInfo(
iPtr->flags |= ERR_LEGACY_COPY;
if (iPtr->errorInfo == NULL) {
-#if 0
- if (iPtr->result[0] != 0) {
- /*
- * The interp's string result is set, apparently by some extension
- * making a deprecated direct write to it. That extension may
- * expect interp->result to continue to be set, so we'll take
- * special pains to avoid clearing it, until we drop support for
- * interp->result completely.
- */
-
- iPtr->errorInfo = Tcl_NewStringObj(iPtr->result, -1);
- } else {
-#endif
- iPtr->errorInfo = iPtr->objResultPtr;
-#if 0
- }
-#endif
+ iPtr->errorInfo = iPtr->objResultPtr;
Tcl_IncrRefCount(iPtr->errorInfo);
if (!iPtr->errorCode) {
Tcl_SetErrorCode(interp, "NONE", NULL);