summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2003-07-16 21:25:07 (GMT)
committerhobbs <hobbs>2003-07-16 21:25:07 (GMT)
commit8950d01535cc68e18a799015b5bd31af5c9562c3 (patch)
tree7420a60f355dca8b31bfe9fec2dc4a6bb9cf47be
parent807f03b48dcdb08f9acb0493b804a5b41d5bf7a0 (diff)
downloadtcl-8950d01535cc68e18a799015b5bd31af5c9562c3.zip
tcl-8950d01535cc68e18a799015b5bd31af5c9562c3.tar.gz
tcl-8950d01535cc68e18a799015b5bd31af5c9562c3.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)
-rw-r--r--ChangeLog28
-rw-r--r--generic/tclPreserve.c8
-rw-r--r--generic/tclResult.c20
-rw-r--r--generic/tclUtil.c5
4 files changed, 29 insertions, 32 deletions
diff --git a/ChangeLog b/ChangeLog
index 800da69..2381202 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-07-16 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * 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)
+
2003-07-16 Mo DeJong <mdejong@users.sourceforge.net>
* win/Makefile.in: Don't define TCL_DBGX
@@ -99,11 +105,11 @@
do encoding conversion by dropping high bytes, unlike the rest of
the core. [Bug 735364]
-2003-07-11 Don Porter <dgp@users.sourceforge.net>
+2003-07-11 Don Porter <dgp@users.sourceforge.net>
- * library/package.tcl: Corrected [pkg_mkIndex] bug reported on
- comp.lang.tcl. The indexer was searching for newly indexed packages
- instead of newly provided packages.
+ * library/package.tcl: Corrected [pkg_mkIndex] bug reported on
+ comp.lang.tcl. The indexer was searching for newly indexed packages
+ instead of newly provided packages.
2003-07-04 Donal K. Fellows <fellowsd@cs.man.ac.uk>
@@ -152,17 +158,17 @@
the part of [Bug 495830] that is new in 8.4.
* tests/interp.test: Added tests 18.9 (knownbug) and 18.10
-2003-06-09 Don Porter <dgp@users.sourceforge.net>
+2003-06-09 Don Porter <dgp@users.sourceforge.net>
- * string.test (string-4.15): Added test for [string first] bug
- reported in Tcl 8.3, where test for all-single-byte-encoded strings
- was not reliable.
+ * tests/string.test (string-4.15): Added test for [string first] bug
+ reported in Tcl 8.3, where test for all-single-byte-encoded strings
+ was not reliable.
2003-06-04 Joe Mistachkin <joe@mistachkin.com>
- * tools/man2help.tcl: Added duplicate help section checking
- * tools/index.tcl: and corrected a comment typo for the
- getTopics proc in index.tcl [Bug #748700].
+ * tools/man2help.tcl: Added duplicate help section checking
+ * tools/index.tcl: and corrected a comment typo for the
+ getTopics proc in index.tcl [Bug #748700].
2003-05-23 Don Porter <dgp@users.sourceforge.net>
diff --git a/generic/tclPreserve.c b/generic/tclPreserve.c
index 50dfb02..04615b7 100644
--- a/generic/tclPreserve.c
+++ b/generic/tclPreserve.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclPreserve.c,v 1.3 1999/04/16 00:46:52 stanton Exp $
+ * RCS: @(#) $Id: tclPreserve.c,v 1.3.34.1 2003/07/16 21:25:07 hobbs Exp $
*/
#include "tclInt.h"
@@ -233,8 +233,7 @@ Tcl_Release(clientData)
refArray[i] = refArray[inUse];
}
if (mustFree) {
- if ((freeProc == TCL_DYNAMIC) ||
- (freeProc == (Tcl_FreeProc *) free)) {
+ if (freeProc == TCL_DYNAMIC) {
ckfree((char *) clientData);
} else {
Tcl_MutexUnlock(&preserveMutex);
@@ -306,8 +305,7 @@ Tcl_EventuallyFree(clientData, freeProc)
* No reference for this block. Free it now.
*/
- if ((freeProc == TCL_DYNAMIC)
- || (freeProc == (Tcl_FreeProc *) free)) {
+ if (freeProc == TCL_DYNAMIC) {
ckfree((char *) clientData);
} else {
(*freeProc)((char *)clientData);
diff --git a/generic/tclResult.c b/generic/tclResult.c
index 367ca80..9cfbd63 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.5 2002/01/25 20:40:55 dgp Exp $
+ * RCS: @(#) $Id: tclResult.c,v 1.5.2.1 2003/07/16 21:25:07 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);
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index 2572891..cb15ffd 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUtil.c,v 1.36.2.1 2003/04/16 23:31:46 dgp Exp $
+ * RCS: @(#) $Id: tclUtil.c,v 1.36.2.2 2003/07/16 21:25:07 hobbs Exp $
*/
#include "tclInt.h"
@@ -1744,8 +1744,7 @@ Tcl_DStringGetResult(interp, dsPtr)
dsPtr->length = strlen(iPtr->result);
if (iPtr->freeProc != NULL) {
- if ((iPtr->freeProc == TCL_DYNAMIC)
- || (iPtr->freeProc == (Tcl_FreeProc *) free)) {
+ if (iPtr->freeProc == TCL_DYNAMIC) {
dsPtr->string = iPtr->result;
dsPtr->spaceAvl = dsPtr->length+1;
} else {