summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2001-10-01 15:31:51 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2001-10-01 15:31:51 (GMT)
commitf5e3ef145e3c2b10f75ae017b00ef97b2833e23a (patch)
treef125e2c85211782096771dda0323260b5c1c3d34
parentc1bf313ccab38b8a3a01c91baf5f02288f604a07 (diff)
downloadtcl-f5e3ef145e3c2b10f75ae017b00ef97b2833e23a.zip
tcl-f5e3ef145e3c2b10f75ae017b00ef97b2833e23a.tar.gz
tcl-f5e3ef145e3c2b10f75ae017b00ef97b2833e23a.tar.bz2
removed unnecessary inclusions of tclCompile.h [Patch 466823]
-rw-r--r--ChangeLog8
-rw-r--r--generic/tclCmdIL.c25
-rw-r--r--generic/tclCmdMZ.c3
-rw-r--r--generic/tclParseExpr.c3
4 files changed, 19 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index d10538c..39db414 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2001-09-30 Miguel Sofer <msofer@users.sourceforge.net>
+
+ * generic/tclCmdIL.c:
+ * generic/tclCmdMZ.c:
+ * generic/tclParseExpr.c: removed unnecessary inclusion of
+ tclCompile.h and made a small modification in (InfoBodyCmd) to
+ improve the isolation of the compiler/engine subsystem.
+
2001-09-29 Vince Darley <vincentdarley@users.sourceforge.net>
* generic/tclIOUtil.c:
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index 2e8a032..b3461f9 100644
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.c
@@ -14,12 +14,11 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCmdIL.c,v 1.34 2001/09/28 15:32:17 dkf Exp $
+ * RCS: @(#) $Id: tclCmdIL.c,v 1.35 2001/10/01 15:31:51 msofer Exp $
*/
#include "tclInt.h"
#include "tclPort.h"
-#include "tclCompile.h"
#include "tclRegexp.h"
/*
@@ -575,23 +574,17 @@ InfoBodyCmd(dummy, interp, objc, objv)
return TCL_ERROR;
}
- /*
- * We should not return a bytecompiled body. If it is precompiled,
- * then the bodyPtr's string representation is bogus, since sources
- * are not available. If it was just a bytecompiled body, then it
- * is likely to not be of any use to the caller, as it was compiled
- * for a separate procedure context [Bug: 3412], and noone else can
- * reasonably use it.
- * In order to make sure that later manipulations of the object do not
- * invalidate the internal representation, we make a copy of the string
- * representation and return that one, instead.
+ /*
+ * Here we used to return procPtr->bodyPtr, except when the body was
+ * bytecompiled - in that case, the return was a copy of the body's
+ * string rep. In order to better isolate the implementation details
+ * of the compiler/engine subsystem, we now always return a copy of
+ * the string rep. It is important to return a copy so that later
+ * manipulations of the object do not invalidate the internal rep.
*/
bodyPtr = procPtr->bodyPtr;
- resultPtr = bodyPtr;
- if (bodyPtr->typePtr == &tclByteCodeType) {
- resultPtr = Tcl_NewStringObj(bodyPtr->bytes, bodyPtr->length);
- }
+ resultPtr = Tcl_NewStringObj(bodyPtr->bytes, bodyPtr->length);
Tcl_SetObjResult(interp, resultPtr);
return TCL_OK;
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index 66b6106..abf08b9 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -13,12 +13,11 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCmdMZ.c,v 1.45 2001/09/13 23:49:57 hobbs Exp $
+ * RCS: @(#) $Id: tclCmdMZ.c,v 1.46 2001/10/01 15:31:51 msofer Exp $
*/
#include "tclInt.h"
#include "tclPort.h"
-#include "tclCompile.h"
#include "tclRegexp.h"
/*
diff --git a/generic/tclParseExpr.c b/generic/tclParseExpr.c
index ccd58a9..f37c626 100644
--- a/generic/tclParseExpr.c
+++ b/generic/tclParseExpr.c
@@ -12,11 +12,10 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclParseExpr.c,v 1.8 2001/04/09 09:48:41 dkf Exp $
+ * RCS: @(#) $Id: tclParseExpr.c,v 1.9 2001/10/01 15:31:51 msofer Exp $
*/
#include "tclInt.h"
-#include "tclCompile.h"
/*
* The stuff below is a bit of a hack so that this file can be used in