From 0f8b9130ec96b8ef7ba2abe8b6d6a60cf98707fe Mon Sep 17 00:00:00 2001 From: stanton Date: Tue, 6 Oct 1998 00:42:45 +0000 Subject: added a warning about static string modifications --- generic/tclCompExpr.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c index c872698..0f494b9 100644 --- a/generic/tclCompExpr.c +++ b/generic/tclCompExpr.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompExpr.c,v 1.1.2.2 1998/09/24 23:58:43 stanton Exp $ + * RCS: @(#) $Id: tclCompExpr.c,v 1.1.2.3 1998/10/06 00:42:45 stanton Exp $ */ #include "tclInt.h" @@ -480,6 +480,13 @@ CompileSubExpr(exprTokenPtr, infoPtr, envPtr) * operator isn't found, treat it as a math function. */ + /* + * TODO: Note that the string is modified in place. This is unsafe + * and will break if any of the routines called while the string is + * modified have side effects that depend on the original string + * being unmodified (e.g. adding an etry to the literal table). + */ + operator = tokenPtr->start; savedChar = operator[tokenPtr->size]; operator[tokenPtr->size] = 0; -- cgit v0.12