summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdMZ.c
Commit message (Collapse)AuthorAgeFilesLines
* Revised TclFindElement() interface.dgp2011-05-021-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The final argument had been bracePtr, the address of a boolean var, where the caller can be told whether or not the parsed list element was enclosed in braces. In practice, no callers really care about that. What the callers really want to know is whether the list element value exists as a literal substring of the string being parsed, or whether a call to TclCopyAndCollpase() is needed to produce the list element value. Now the final argument is changed to do what callers actually need. This is a better fit for the calls in tclParse.c, where now a good deal of post-processing checking for "naked backslashes" is no longer necessary. ***POTENTIAL INCOMPATIBILITY*** For any callers calling in via the internal stubs table who really do use the final argument explicitly to check for the enclosing brace scenario. Simply looking for the braces where they must be is the revision available to those callers, and it will backport cleanly. Tests for expanded literals quoting detection.
| * Revised TclFindElement() interface.dgp2011-05-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The final argument had been bracePtr, the address of a boolean var, where the caller can be told whether or not the parsed list element was enclosed in braces. In practice, no callers really care about that. What the callers really want to know is whether the list element value exists as a literal substring of the string being parsed, or whether a call to TclCopyAndCollpase() is needed to produce the list element value. Now the final argument is changed to do what callers actually need. This is a better fit for the calls in tclParse.c, where now a good deal of post-processing checking for "naked backslashes" is no longer necessary. ***POTENTIAL INCOMPATIBILITY*** For any callers calling in via the internal stubs table who really do use the final argument explicitly to check for the enclosing brace scenario. Simply looking for the braces where they must be is the revision available to those callers, and it will backport cleanly.
* | New utility routines: TclIsSpaceProc() and TclCountSpaceRuns()dgp2011-04-281-1/+1
|\ \ | |/ | | Use to replace calls to isspace() and their /* INTL */ risk.
| * New utility routines: TclIsSpaceProc() and TclCountSpaceRuns()dgp2011-04-281-1/+1
| | | | | | Use to replace calls to isspace() and their /* INTL */ risk.
* | TclFreeIntRep() cleanup.dgp2011-04-271-2/+0
| |
* | [Bug 3285375]: Rewrite Tcl_Concat*() and [string trim*].dgp2011-04-131-113/+14
|\ \ | |/
| * [Bug 3285375]: Rewrite Tcl_Concat*() and [string trim*].dgp2011-04-131-113/+14
| |
* | More generation of errorCode information, notably when lists are mis-parsed.dkf2011-03-291-0/+42
| |
* | Use the error messages generated by the variable management code rather thandkf2011-03-281-9/+4
| | | | | | creating our own in [regexp] and [regsub].
* | Adjust ckalloc/ckfree macros to greatly reduce number of explicit casts indkf2011-03-121-3/+3
| | | | | | rest of Tcl source code. No ABI change. API change *should* be harmless.
* | MINOR: Formatting fixes, mainly to comments, so code better fits the style indkf2011-03-101-1/+2
| | | | | | the Engineering Manual.
* | Now that we're no longer using SCM based on RCS, the RCS Keyword linesdgp2011-03-021-2/+0
|\ \ | |/ | | cause more harm than good. Purged them (except in zlib files).
| * Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-021-2/+0
| |\ | | | | | | more harm than good. Purged them.
| | * Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-011-2/+0
| | | | | | | | | more harm than good. Purged them.
| | * [Bug 3127687] Triggers FORTIFY_SOURCE buffer overflow detectionnijtmans2010-12-051-4/+4
| | |
| | * Fixed object leakvasiljevic2010-04-061-3/+2
| | |
| | * * generic/tclCmdMZ.c (Tcl_SubstObj): Pass 'length' values todgp2009-09-181-3/+3
| | | | | | | | | | | | | | | recursive parsing calls to convert O(N^2) operations of [subst] to O(N).
| | * * generic/tclBasic.c (Tcl_CreateInterp, Tcl_EvalTokensStandard,andreas_kupries2009-08-251-17/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * * generic/tclCmdMZ.c: Corrected broken trace reversal logic indgp2007-06-271-4/+4
| | | | | | | | | | | | | | | | | | * generic/tclTest.c: TclCheckInterpTraces that led to infinite loop * tests/basic.test: when multiple Tcl_CreateTrace traces were set and one of them did not fire due to level restrictions. [Bug 1743931].
| | * [Tcl Bug 1706140]dgp2007-05-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCmdMZ.c (Trace*Proc): Update Tcl_VarTraceProcs so * generic/tclLink.c (LinkTraceProc): that they call * generic/tclUtil.c (TclPrecTraceProc): Tcl_InterpDeleted() for themselves, and do not rely on (frequently buggy) setting of the TCL_INTERP_DESTROYED flag by the trace core. * generic/tclVar.c: Update callers of CallVarTraces to not pass in the TCL_INTERP_DESTROYED flag. Also apply filters so that public routines only pass documented flag values down to lower level routines. * generic/tclVar.c (CallVarTraces): The setting of the TCL_INTERP_DESTROYED flag is now done entirely within the CallVarTraces routine, the only place it can be done right.
| | * * generic/tclBasic.c: TIP #280 implementation, conditional on the define ↵andreas_kupries2006-11-281-2/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TCL_TIP280. * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclCompCmds.c: * generic/tclCompExpr.c: * generic/tclCompile.c: * generic/tclCompile.h: * generic/tclExecute.c: * generic/tclIOUtil.c: * generic/tclInt.h: * generic/tclInterp.c: * generic/tclNamesp.c: * generic/tclObj.c: * generic/tclProc.c: * tests/compile.test: * tests/info.test: * tests/platform.test: * tests/safe.test:
| | * * generic/tclCmdMZ.c: Stop some interference between enter tracesdgp2006-04-111-5/+10
| | | | | | | | | | | | * tests/trace.test: and enterstep traces. [Bug 1458266]
| | * * generic/tclBasic.c (Tcl_DeleteCommandFromToken):Miguel Sofer2005-11-181-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCmdMZ.c (TraceCommandProc): * generic/tclInt.h (NS_KILLED): * generic/tclNamesp.c (Tcl_DeleteNamespace * tests/namespace.test (namespace-7.3-6): * tests/trace.test (trace-20.13-16): fix [Bugs 1355942/1355342].
| | * Fix [Bug 1348775] using Miguel's patchdkf2005-11-081-17/+44
| | |
| | * * generic/tclCmdMZ.c (TclCheckExecutionTraces): Corrected mistakendgp2005-11-011-14/+16
| | | | | | | | | | | | | | | assumption that all command traces are set at the script level. Report/fix from Jacques H. de Villiers. [Bug 1337941]
| | * * generic/tclCmdMZ.c (TraceVarProc): [Bug 1337229], partialMiguel Sofer2005-10-291-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | fix. Insure that a second call with TCL_TRACE_DESTROYED does not lead to a second call to Tcl_EventuallyFree(). It is still true that that second call should not happen, so the bug is not completely fixed. * tests/trace.test (test-18.3-4): added tests for bugs #1337229 and 1338280.
| | * * generic/tclBasic.c:Miguel Sofer2005-10-231-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclBinary.c: * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclExecute.c: * generic/tclLink.c: * generic/tclMain.c: * generic/tclProc.c: * generic/tclScan.c: * generic/tclTest.c: * generic/tclVar.c: * mac/tclMacInit.c: * unix/tclUnixInit.c: * win/tclWinInit.c: Insure that the core never calls TclPtrSetVar, Tcl_SetVar2Ex, Tcl_ObjSetVar2 or Tcl_SetObjErrorCode with a 0-ref new value. It is not possible to handle error returns correctly in that case [Bug 1334947], one has the choice of leaking the object in some cases, or else risk crashing in some others.
| | * * generic/tclBasic.c: Made the walk of the active trace list awaredgp2005-06-211-4/+16
| | | | | | | | | | | | | | | | | | * generic/tclCmdMZ.c: of the direction of trace scanning, so the * generic/tclInt.h: proper correction can be made. [Bug 1224585] * tests/trace.test (trace-34.2,3):
| | * * generic/tclCmdMZ.c (Tcl_TimeObjCmd): add necessary casthobbs2005-05-251-2/+3
| | |
| | * * generic/tclCmdMZ.c (Tcl_TimeObjCmd): change [time] called with adas2005-05-241-6/+11
| | | | | | | | | | | | | | | count > 1 to return a string with a float value instead of a rounded off integer. [Bug 1202178]
| | * * tests/string.test: string-10.[21-30]hobbs2005-05-111-2/+5
| | | | | | | | | | | | | | | * generic/tclCmdMZ.c (Tcl_StringObjCmd): add extra checks to prevent possible UMR in unichar cmp function for string map.
| | * * generic/tclCmdMZ.c: Corrected intrep-dependence ofdgp2005-04-221-9/+3
| | | | | | | | | | | | * tests/string.test: [string is boolean] [Bug 1187123]
| | * * generic/tclBasic.c (Tcl_EvalEx,TclEvalTokensStandard):dgp2005-03-181-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCmdMZ.c (Tcl_SubstObj): * tests/basic.test (basic-46.4): Restored recursion limit * tests/parse.test (parse-19.*): testing in nested command substitutions within direct script evaluation (Tcl_EvalEx) that got lost in the parser reforms of Tcl 8.1. Added tests for correct behavior. [Bug 1115904]
| | * * generic/tclCmdMZ.c (TclCheckInterpTraces): Corrected mistakendgp2005-03-101-12/+11
| | | | | | | | | | | | | | | cast of ClientData to (TraceCommandInfo *) when not warranted. Thanks to Yuri Victorovich for the report. [Bug 1153871]
| | * * generic/tclCmdMZ.c (Tcl_TraceObjCmd): Fixed Bug 1065378 which faileddgp2004-11-151-87/+36
| | | | | | | | | | | | | | | | | | * tests/trace.test (trace-33.1): to permit a variable trace created with [trace variable] to be destroyed with [trace remove]. Thanks to Keith Vetter for the report.
| | * Fix crash in [string map] when objects are shared. [Bug 1018562]dkf2004-08-301-5/+21
| | |
| | * * generic/tclCmdMZ.c (TclCheckInterpTraces): The TIP 62dgp2004-03-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | * generic/tclTest.c (TestcmdtraceCmd): implementation introduced a * tests/basic.test (basic-39.10): bug by testing the CallFrame level instead of the iPtr->numLevels level when deciding what traces created by Tcl_Create(Obj)Trace to call. Added test to expose the error, and made fix. [Request 462580]
| | * * generic/tclCmdMZ.c (TclTraceExecutionObjCmd)hobbs2004-02-171-6/+4
| | | | | | | | | | | | (TclTraceCommandObjCmd): fix possible mem leak in trace info.
| | * regsub fixvincentdarley2003-10-141-2/+13
| | |
| | * * generic/tclBasic.c: Fixed error in ref count management of commanddgp2003-10-031-16/+65
| | | | | | | | | | | | | | | * generic/tclCmdMZ.c: and execution traces that caused access to freed memory in trace-32.1. [Bug 811483].
| | * * generic/tclCmdMZ.c (): Fixed [Bug 807243] wheredgp2003-09-241-1/+17
| | | | | | | | | | | | | | | | | | * tests/trace.test (trace-31,32.*): the introspection results of both [trace info command] and [trace info execution] were getting co-mingled. Thanks to Mark Saye for the report.
| | * Removed trivially-unreachable line [Bug 771939]dkf2003-07-161-2/+1
| | |
| | * backport of regsub empty string fixesvincentdarley2003-06-171-6/+16
| | |
| | * * generic/tclCmdMZ.c (Tcl_StringObjCmd): prevent string repeathobbs2003-05-101-1/+10
| | | | | | | | | | | | crash when overflow sizes were given (throws error). [Bug #714106]
| | * * generic/tclCmdMZ.c (Tcl_StringObjCmd,STR_IS_INT): Correcteddgp2003-04-111-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | inconsistent results of [string is integer] observed on systems where sizeof(long) != sizeof(int). [Bug 718878] * tests/string.test: Added tests for Bug 718878. * doc/string.n: Clarified that [string is integer] accepts 32-bit integers.
| | * * generic/tclCmdMZ.c (TraceExecutionProc): Added missingdgp2003-04-071-2/+4
| | | | | | | | | | | | Tcl_DiscardResult() call to avoid memory leak.
| | * * generic/tclCmdMZ.c (Tcl_SubstObj): Corrected and added test fordgp2003-03-121-15/+16
| | | | | | | | | | | | | | | * tests/subst.test (subst-2.4): Tcl_SubstObj's incorrect halting of substitution at the first \x00 byte. [Bug 685106]
| * | * generic/tclCmdMZ.c (Tcl_RegexpObjCmd): [Bug 2826551, Patch 2948425]:dkf2010-08-121-19/+27
| | | | | | | | | | | | Backport of updates to make handling of RE line anchors correct.
| * | Reverted previous checin as Tcl_ObjSetVar2 (convoluted and undocumented)vasiljevic2010-04-061-2/+1
| | | | | | | | | | | | | | | jnterface implicitly decrements refcount of the passed result object when the passed result object refcount was already zero.
| * | Fixed object leakvasiljevic2010-04-061-1/+2
| | |