summaryrefslogtreecommitdiffstats
path: root/generic/tclResult.c
diff options
context:
space:
mode:
authorhobbs <hobbs>2003-07-16 21:24:12 (GMT)
committerhobbs <hobbs>2003-07-16 21:24:12 (GMT)
commitde6aa74101b91995aba9134c5093a6899d4da019 (patch)
tree560c3be33951c19b7e96c3a683df817cf5f3e0f3 /generic/tclResult.c
parenta947e7228276a5effd3f3f179cd252a4934426ac (diff)
downloadtcl-de6aa74101b91995aba9134c5093a6899d4da019.zip
tcl-de6aa74101b91995aba9134c5093a6899d4da019.tar.gz
tcl-de6aa74101b91995aba9134c5093a6899d4da019.tar.bz2
* generic/tclPreserve.c: In Result and Preserve'd routines, do not
* generic/tclUtil.c: assume that ckfree == free, as that is not * generic/tclResult.c: always true. [Bug 756791] (fuller)
Diffstat (limited to 'generic/tclResult.c')
-rw-r--r--generic/tclResult.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/generic/tclResult.c b/generic/tclResult.c
index 4eb3c69..22cf249 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.6 2003/05/05 20:54:40 dgp Exp $
+ * RCS: @(#) $Id: tclResult.c,v 1.7 2003/07/16 21:24:12 hobbs Exp $
*/
#include "tclInt.h"
@@ -198,8 +198,7 @@ Tcl_DiscardResult(statePtr)
if (statePtr->result == statePtr->appendResult) {
ckfree(statePtr->appendResult);
} else if (statePtr->freeProc) {
- if ((statePtr->freeProc == TCL_DYNAMIC)
- || (statePtr->freeProc == (Tcl_FreeProc *) free)) {
+ if (statePtr->freeProc == TCL_DYNAMIC) {
ckfree(statePtr->result);
} else {
(*statePtr->freeProc)(statePtr->result);
@@ -265,8 +264,7 @@ Tcl_SetResult(interp, string, freeProc)
*/
if (oldFreeProc != 0) {
- if ((oldFreeProc == TCL_DYNAMIC)
- || (oldFreeProc == (Tcl_FreeProc *) free)) {
+ if (oldFreeProc == TCL_DYNAMIC) {
ckfree(oldResult);
} else {
(*oldFreeProc)(oldResult);
@@ -359,8 +357,7 @@ Tcl_SetObjResult(interp, objPtr)
*/
if (iPtr->freeProc != NULL) {
- if ((iPtr->freeProc == TCL_DYNAMIC)
- || (iPtr->freeProc == (Tcl_FreeProc *) free)) {
+ if (iPtr->freeProc == TCL_DYNAMIC) {
ckfree(iPtr->result);
} else {
(*iPtr->freeProc)(iPtr->result);
@@ -413,8 +410,7 @@ Tcl_GetObjResult(interp)
TclInitStringRep(objResultPtr, iPtr->result, length);
if (iPtr->freeProc != NULL) {
- if ((iPtr->freeProc == TCL_DYNAMIC)
- || (iPtr->freeProc == (Tcl_FreeProc *) free)) {
+ if (iPtr->freeProc == TCL_DYNAMIC) {
ckfree(iPtr->result);
} else {
(*iPtr->freeProc)(iPtr->result);
@@ -751,8 +747,7 @@ Tcl_FreeResult(interp)
register Interp *iPtr = (Interp *) interp;
if (iPtr->freeProc != NULL) {
- if ((iPtr->freeProc == TCL_DYNAMIC)
- || (iPtr->freeProc == (Tcl_FreeProc *) free)) {
+ if (iPtr->freeProc == TCL_DYNAMIC) {
ckfree(iPtr->result);
} else {
(*iPtr->freeProc)(iPtr->result);
@@ -791,8 +786,7 @@ Tcl_ResetResult(interp)
ResetObjResult(iPtr);
if (iPtr->freeProc != NULL) {
- if ((iPtr->freeProc == TCL_DYNAMIC)
- || (iPtr->freeProc == (Tcl_FreeProc *) free)) {
+ if (iPtr->freeProc == TCL_DYNAMIC) {
ckfree(iPtr->result);
} else {
(*iPtr->freeProc)(iPtr->result);