diff options
author | escoffon <escoffon> | 1998-07-14 10:34:43 (GMT) |
---|---|---|
committer | escoffon <escoffon> | 1998-07-14 10:34:43 (GMT) |
commit | 26e4dbbde2cd14e34e234ca3a18659376b7ea699 (patch) | |
tree | ab0c9d123b0b7ddd98b73a5066a407e752333fad | |
parent | ee668dffac296329b8a58c0e71f6751e522f2cfd (diff) | |
download | tcl-26e4dbbde2cd14e34e234ca3a18659376b7ea699.zip tcl-26e4dbbde2cd14e34e234ca3a18659376b7ea699.tar.gz tcl-26e4dbbde2cd14e34e234ca3a18659376b7ea699.tar.bz2 |
rolled back the check for compiled procs in Tcl_ProcObjCmd, do the unsharing
even for compiled procs. This will cause an error to be triggered the first
time the proc is called (because the source is just an error statement)
-rw-r--r-- | generic/tclProc.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/generic/tclProc.c b/generic/tclProc.c index bfef4b0..4c1a9a4 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * SCCS: %Z% $Id: tclProc.c,v 1.5 1998/07/06 14:38:20 escoffon Exp $ + * SCCS: %Z% $Id: tclProc.c,v 1.6 1998/07/14 10:34:43 escoffon Exp $ */ #include "tclInt.h" @@ -104,26 +104,13 @@ Tcl_ProcObjCmd(dummy, interp, objc, objv) * procedures that have a different number of arguments, even if their * bodies are identical. Note that we don't use Tcl_DuplicateObj since * we would not want any bytecode internal representation. - * - * But if this is a precompiled bytecode object, then do not duplicate it; - * precompiled bytecodes are immutable, and there is no source to - * recompile anyway. */ bodyPtr = objv[3]; if (Tcl_IsShared(bodyPtr)) { - if (bodyPtr->typePtr == &tclByteCodeType) { - ByteCode *codePtr - = (ByteCode *) bodyPtr->internalRep.otherValuePtr; - if (codePtr->flags & TCL_BYTECODE_PRECOMPILED) { - goto skip_unshare; - } - } - bytes = Tcl_GetStringFromObj(bodyPtr, &length); bodyPtr = Tcl_NewStringObj(bytes, length); } - skip_unshare: /* * Create and initialize a Proc structure for the procedure. Note that |