From 26e4dbbde2cd14e34e234ca3a18659376b7ea699 Mon Sep 17 00:00:00 2001 From: escoffon Date: Tue, 14 Jul 1998 10:34:43 +0000 Subject: 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) --- generic/tclProc.c | 15 +-------------- 1 file changed, 1 insertion(+), 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 -- cgit v0.12