summaryrefslogtreecommitdiffstats
path: root/generic/tclProc.c
diff options
context:
space:
mode:
authorandreas_kupries <akupries@shaw.ca>2009-08-25 20:59:09 (GMT)
committerandreas_kupries <akupries@shaw.ca>2009-08-25 20:59:09 (GMT)
commit290495c7ce8eaa67ffe2fa4fc3b8106742148a27 (patch)
tree4a737e378aa3ed2c71519eae3320f02faabfcc2c /generic/tclProc.c
parentf9ad150a1ad924f9775cf6d740e1bd5018acc492 (diff)
downloadtcl-290495c7ce8eaa67ffe2fa4fc3b8106742148a27.zip
tcl-290495c7ce8eaa67ffe2fa4fc3b8106742148a27.tar.gz
tcl-290495c7ce8eaa67ffe2fa4fc3b8106742148a27.tar.bz2
* generic/tclBasic.c (Tcl_CreateInterp, Tcl_EvalTokensStandard,
EvalTokensStandard, Tcl_EvalEx, EvalEx, TclAdvanceContinuations, TclEvalObjEx): * generic/tclCmdMZ.c (Tcl_SwitchObjCmd, ListLines): * generic/tclCompCmds.c (*): * generic/tclCompile.c (TclSetByteCodeFromAny, TclInitCompileEnv, TclFreeCompileEnv, TclCompileScript): * generic/tclCompile.h (CompileEnv): * generic/tclInt.h (ContLineLoc, Interp): * generic/tclObj.c (ThreadSpecificData, ContLineLocFree, TclThreadFinalizeObjects, TclInitObjSubsystem, TclContinuationsEnter, TclContinuationsEnterDerived, TclContinuationsCopy, TclContinuationsGet, TclFreeObj): * generic/tclProc.c (TclCreateProc): * generic/tclVar.c (TclPtrSetVar): * tests/info.test (info-30.0-22): Extended parser, compiler, and execution with code and attendant data structures tracking the positions of continuation lines which are not visible in script's, to properly account for them while counting lines for #280, during direct and compiled execution.
Diffstat (limited to 'generic/tclProc.c')
-rw-r--r--generic/tclProc.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/generic/tclProc.c b/generic/tclProc.c
index 1e9f6b4..8ceb184 100644
--- a/generic/tclProc.c
+++ b/generic/tclProc.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclProc.c,v 1.44.2.10 2009/06/13 14:38:44 dgp Exp $
+ * RCS: @(#) $Id: tclProc.c,v 1.44.2.11 2009/08/25 20:59:11 andreas_kupries Exp $
*/
#include "tclInt.h"
@@ -366,8 +366,20 @@ TclCreateProc(interp, nsPtr, procName, argsPtr, bodyPtr, procPtrPtr)
*/
if (Tcl_IsShared(bodyPtr)) {
+#ifdef TCL_TIP280
+ Tcl_Obj* sharedBodyPtr = bodyPtr;
+#endif
bytes = Tcl_GetStringFromObj(bodyPtr, &length);
bodyPtr = Tcl_NewStringObj(bytes, length);
+#ifdef TCL_TIP280
+ /*
+ * TIP #280.
+ * Ensure that the continuation line data for the original body is
+ * not lost and applies to the new body as well.
+ */
+
+ TclContinuationsCopy (bodyPtr, sharedBodyPtr);
+#endif
}
/*