diff options
author | andreas_kupries <andreas_kupries@noemail.net> | 2009-08-25 21:03:25 (GMT) |
---|---|---|
committer | andreas_kupries <andreas_kupries@noemail.net> | 2009-08-25 21:03:25 (GMT) |
commit | e5506c40d21176a5520cbc2b5af8d5507f80296b (patch) | |
tree | 6a35012c7976983d9ac4f9388eccea03ae9f4fed /generic/tclProc.c | |
parent | b0ce6e61b2583210623eaf88f0ff62031a92aae9 (diff) | |
download | tcl-e5506c40d21176a5520cbc2b5af8d5507f80296b.zip tcl-e5506c40d21176a5520cbc2b5af8d5507f80296b.tar.gz tcl-e5506c40d21176a5520cbc2b5af8d5507f80296b.tar.bz2 |
* generic/tclBasic.c (Tcl_CreateInterp, Tcl_EvalTokensStandard,
Tcl_EvalEx, TclEvalEx, TclAdvanceContinuations, TclNREvalObjEx):
* generic/tclCmdMZ.c (Tcl_SwitchObjCmd, TclListLines):
* generic/tclCompCmds.c (*):
* generic/tclCompile.c (TclSetByteCodeFromAny, TclInitCompileEnv,
TclFreeCompileEnv, TclCompileScript, TclCompileTokens):
* generic/tclCompile.h (CompileEnv):
* generic/tclInt.h (ContLineLoc, Interp):
* generic/tclObj.c (ThreadSpecificData, ContLineLocFree,
TclThreadFinalizeObjects, TclInitObjSubsystem,
TclContinuationsEnter, TclContinuationsEnterDerived,
TclContinuationsCopy, TclContinuationsGet, TclFreeObj):
* generic/tclParse.c (TclSubstTokens, Tcl_SubstObj):
* generic/tclProc.c (TclCreateProc):
* generic/tclVar.c (TclPtrSetVar):
* tests/info.test (info-30.0-24):
Extended the parser, compiler, and execution engine with code and
attendant data structures tracking the position of continuation
lines which are not visible in the resulting script Tcl_Obj*'s, to
properly account for them while counting lines for #280.
FossilOrigin-Name: 9d8e49c947e582cc101d508ec7fe11969a00a44f
Diffstat (limited to 'generic/tclProc.c')
-rw-r--r-- | generic/tclProc.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/generic/tclProc.c b/generic/tclProc.c index 98784c3..12e19da 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,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.173 2009/07/16 21:24:40 dgp Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.174 2009/08/25 21:03:25 andreas_kupries Exp $ */ #include "tclInt.h" @@ -440,8 +440,18 @@ TclCreateProc( */ if (Tcl_IsShared(bodyPtr)) { + Tcl_Obj* sharedBodyPtr = bodyPtr; + bytes = TclGetStringFromObj(bodyPtr, &length); bodyPtr = Tcl_NewStringObj(bytes, length); + + /* + * 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); } /* @@ -2538,7 +2548,7 @@ SetLambdaFromAny( * location (line of 2nd list element). */ - TclListLines(name, contextPtr->line[1], 2, buf); + TclListLines(objPtr, contextPtr->line[1], 2, buf, NULL); cfPtr->level = -1; cfPtr->type = contextPtr->type; |