summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdIL.c
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 /generic/tclCmdIL.c
parentc1bf313ccab38b8a3a01c91baf5f02288f604a07 (diff)
downloadtcl-f5e3ef145e3c2b10f75ae017b00ef97b2833e23a.zip
tcl-f5e3ef145e3c2b10f75ae017b00ef97b2833e23a.tar.gz
tcl-f5e3ef145e3c2b10f75ae017b00ef97b2833e23a.tar.bz2
removed unnecessary inclusions of tclCompile.h [Patch 466823]
Diffstat (limited to 'generic/tclCmdIL.c')
-rw-r--r--generic/tclCmdIL.c25
1 files changed, 9 insertions, 16 deletions
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;