summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandreas_kupries <akupries@shaw.ca>2002-07-19 17:28:18 (GMT)
committerandreas_kupries <akupries@shaw.ca>2002-07-19 17:28:18 (GMT)
commit043bf6c1419246ef89f10b2bb6fff447cd8e5ba6 (patch)
treec332a572b73940f63c0ba355e2f5dc317665ede7
parente42cdf6e782e27a3bcaad4f2e95b53e306a3e61a (diff)
downloadtcl-043bf6c1419246ef89f10b2bb6fff447cd8e5ba6.zip
tcl-043bf6c1419246ef89f10b2bb6fff447cd8e5ba6.tar.gz
tcl-043bf6c1419246ef89f10b2bb6fff447cd8e5ba6.tar.bz2
* generic/tclExecute.c (TclCompileByteCodesForExpr): Bugfix. Added
a missing RELTEMP(compEnv) in line 6043 to release the structure if the object is not of type 'bytecode'. Reported by Gregory Thompson <gst@cisco.com>. * generic/tclInt.h: Changed NEWTEMP, NEWSTR, and RELTEMP macros to use 'ckalloc' and 'ckfree' instead of 'Tcl'_Alloc and 'Tcl_Free'. Suggested by Gregory Thompson <gst@cisco.com>.
-rw-r--r--ChangeLog11
-rw-r--r--generic/tclExecute.c4
-rw-r--r--generic/tclInt.h8
3 files changed, 18 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 362a8c3..2fc742e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2002-07-19 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+
+ * generic/tclExecute.c (TclCompileByteCodesForExpr): Bugfix. Added
+ a missing RELTEMP(compEnv) in line 6043 to release the structure
+ if the object is not of type 'bytecode'. Reported by Gregory
+ Thompson <gst@cisco.com>.
+
+ * generic/tclInt.h: Changed NEWTEMP, NEWSTR, and RELTEMP macros to
+ use 'ckalloc' and 'ckfree' instead of 'Tcl'_Alloc and
+ 'Tcl_Free'. Suggested by Gregory Thompson <gst@cisco.com>.
+
2002-03-18 Andreas Kupries <andreas_kupries@users.sourceforge.net>
* generic/tclCompile.c (TclCompileTokens): Modified imported bugfix
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index fa84ad7..27644b4 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.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: tclExecute.c,v 1.10.2.2.2.3 2001/12/05 18:22:25 andreas_kupries Exp $
+ * RCS: @(#) $Id: tclExecute.c,v 1.10.2.2.2.4 2002/07/19 17:28:21 andreas_kupries Exp $
*/
#include "tclInt.h"
@@ -6039,6 +6039,8 @@ TclCompileByteCodesForExpr(interp, objPtr)
TclPrintByteCodeObj(interp, objPtr);
}
#endif /* TCL_COMPILE_DEBUG */
+ } else {
+ RELTEMP(compEnv);
}
return TCL_OK;
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 85c9614..6cf1840 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -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: tclInt.h,v 1.42.2.3.2.2 2002/03/18 22:30:50 andreas_kupries Exp $
+ * RCS: @(#) $Id: tclInt.h,v 1.42.2.3.2.3 2002/07/19 17:28:21 andreas_kupries Exp $
*/
#ifndef _TCLINT
@@ -2255,10 +2255,10 @@ extern Tcl_Mutex tclObjMutex;
#define TEMP(t) t *
#define ITEM(var,item) var -> item
#define REF(var) (var)
-#define NEWTEMP(t,var) (var) = (t *) Tcl_Alloc(sizeof(t))
-#define RELTEMP(var) Tcl_Free((void*)(var))
+#define NEWTEMP(t,var) (var) = (t *) ckalloc(sizeof(t))
+#define RELTEMP(var) ckfree((void*)(var))
#define STRING(n,var) char* var
-#define NEWSTR(n,var) (var) = (char *) Tcl_Alloc(n)
+#define NEWSTR(n,var) (var) = (char *) ckalloc(n)
#else
#define TEMP(t) t
#define ITEM(var,item) var . item