summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/SetResult.312
-rw-r--r--generic/tcl.decls7
-rw-r--r--generic/tclDecls.h8
-rw-r--r--generic/tclResult.c30
-rw-r--r--generic/tclStubInit.c2
5 files changed, 9 insertions, 50 deletions
diff --git a/doc/SetResult.3 b/doc/SetResult.3
index 07e2344..1355d6b 100644
--- a/doc/SetResult.3
+++ b/doc/SetResult.3
@@ -9,7 +9,7 @@
.so man.macros
.BS
.SH NAME
-Tcl_SetObjResult, Tcl_GetObjResult, Tcl_SetResult, Tcl_GetStringResult, Tcl_AppendResult, Tcl_AppendElement, Tcl_ResetResult, Tcl_TransferResult, Tcl_FreeResult \- manipulate Tcl result
+Tcl_SetObjResult, Tcl_GetObjResult, Tcl_SetResult, Tcl_GetStringResult, Tcl_AppendResult, Tcl_AppendElement, Tcl_ResetResult, Tcl_TransferResult \- manipulate Tcl result
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
@@ -31,8 +31,6 @@ const char *
\fBTcl_TransferResult\fR(\fIsourceInterp, code, targetInterp\fR)
.sp
\fBTcl_AppendElement\fR(\fIinterp, element\fR)
-.sp
-\fBTcl_FreeResult\fR(\fIinterp\fR)
.SH ARGUMENTS
.AS Tcl_FreeProc sourceInterp out
.AP Tcl_Interp *interp out
@@ -177,14 +175,6 @@ single character
or ends in the characters
.QW " {" )
then no space is added.
-.PP
-\fBTcl_FreeResult\fR performs part of the work
-of \fBTcl_ResetResult\fR.
-It frees up the memory associated with \fIinterp\fR's result.
-It also sets \fIinterp->freeProc\fR to zero, but does not
-change \fIinterp->result\fR or clear error state.
-\fBTcl_FreeResult\fR is most commonly used when a procedure
-is about to replace one result value with another.
.SH "THE TCL_FREEPROC ARGUMENT TO TCL_SETRESULT"
.PP
\fBTcl_SetResult\fR's \fIfreeProc\fR argument specifies how
diff --git a/generic/tcl.decls b/generic/tcl.decls
index f852601..98cddd5 100644
--- a/generic/tcl.decls
+++ b/generic/tcl.decls
@@ -540,9 +540,10 @@ declare 145 {
declare 146 {
int Tcl_Flush(Tcl_Channel chan)
}
-declare 147 {
- void Tcl_FreeResult(Tcl_Interp *interp)
-}
+# Removed in 9.0, TIP 559
+#declare 147 {
+# void Tcl_FreeResult(Tcl_Interp *interp)
+#}
declare 148 {
int Tcl_GetAlias(Tcl_Interp *interp, const char *slaveCmd,
Tcl_Interp **targetInterpPtr, const char **targetCmdPtr,
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index be71893..d944676 100644
--- a/generic/tclDecls.h
+++ b/generic/tclDecls.h
@@ -434,8 +434,7 @@ EXTERN Tcl_HashEntry * Tcl_FirstHashEntry(Tcl_HashTable *tablePtr,
Tcl_HashSearch *searchPtr);
/* 146 */
EXTERN int Tcl_Flush(Tcl_Channel chan);
-/* 147 */
-EXTERN void Tcl_FreeResult(Tcl_Interp *interp);
+/* Slot 147 is reserved */
/* 148 */
EXTERN int Tcl_GetAlias(Tcl_Interp *interp,
const char *slaveCmd,
@@ -1941,7 +1940,7 @@ typedef struct TclStubs {
void (*reserved144)(void);
Tcl_HashEntry * (*tcl_FirstHashEntry) (Tcl_HashTable *tablePtr, Tcl_HashSearch *searchPtr); /* 145 */
int (*tcl_Flush) (Tcl_Channel chan); /* 146 */
- void (*tcl_FreeResult) (Tcl_Interp *interp); /* 147 */
+ void (*reserved147)(void);
int (*tcl_GetAlias) (Tcl_Interp *interp, const char *slaveCmd, Tcl_Interp **targetInterpPtr, const char **targetCmdPtr, int *argcPtr, const char ***argvPtr); /* 148 */
int (*tcl_GetAliasObj) (Tcl_Interp *interp, const char *slaveCmd, Tcl_Interp **targetInterpPtr, const char **targetCmdPtr, int *objcPtr, Tcl_Obj ***objv); /* 149 */
void * (*tcl_GetAssocData) (Tcl_Interp *interp, const char *name, Tcl_InterpDeleteProc **procPtr); /* 150 */
@@ -2754,8 +2753,7 @@ extern const TclStubs *tclStubsPtr;
(tclStubsPtr->tcl_FirstHashEntry) /* 145 */
#define Tcl_Flush \
(tclStubsPtr->tcl_Flush) /* 146 */
-#define Tcl_FreeResult \
- (tclStubsPtr->tcl_FreeResult) /* 147 */
+/* Slot 147 is reserved */
#define Tcl_GetAlias \
(tclStubsPtr->tcl_GetAlias) /* 148 */
#define Tcl_GetAliasObj \
diff --git a/generic/tclResult.c b/generic/tclResult.c
index 3ca3c7b..69edd39 100644
--- a/generic/tclResult.c
+++ b/generic/tclResult.c
@@ -373,36 +373,6 @@ Tcl_AppendElement(
/*
*----------------------------------------------------------------------
*
- * Tcl_FreeResult --
- *
- * This function frees up the memory associated with an interpreter's
- * result, resetting the interpreter's result object. Tcl_FreeResult is
- * most commonly used when a function is about to replace one result
- * value with another.
- *
- * Results:
- * None.
- *
- * Side effects:
- * Frees the memory associated with interp's result but does not change
- * any part of the error dictionary (i.e., the errorinfo and errorcode
- * remain the same).
- *
- *----------------------------------------------------------------------
- */
-
-void
-Tcl_FreeResult(
- Tcl_Interp *interp)/* Interpreter for which to free result. */
-{
- Interp *iPtr = (Interp *) interp;
-
- ResetObjResult(iPtr);
-}
-
-/*
- *----------------------------------------------------------------------
- *
* Tcl_ResetResult --
*
* This function resets both the interpreter's string and object results.
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index 01434b9..3ca9fe4 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -894,7 +894,7 @@ const TclStubs tclStubs = {
0, /* 144 */
Tcl_FirstHashEntry, /* 145 */
Tcl_Flush, /* 146 */
- Tcl_FreeResult, /* 147 */
+ 0, /* 147 */
Tcl_GetAlias, /* 148 */
Tcl_GetAliasObj, /* 149 */
Tcl_GetAssocData, /* 150 */