diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclCmdIL.c | 25 | ||||
-rw-r--r-- | generic/tclCmdMZ.c | 3 | ||||
-rw-r--r-- | generic/tclParseExpr.c | 3 |
3 files changed, 11 insertions, 20 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; 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 |