summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdMZ.c
Commit message (Collapse)AuthorAgeFilesLines
* * 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 (TraceCommandProc): Fix mem leak whenhobbs2003-02-271-1/+6
| | | | deleting a command that had trace on it. [Bug #693564] (sofer)
* * generic/tclExecute.c (TclExecuteByteCode INST_STR_MATCH):hobbs2003-02-181-5/+6
| | | | | | | | | | | | * generic/tclCmdMZ.c (Tcl_StringObjCmd STR_MATCH): * generic/tclUtf.c (TclUniCharMatch): * generic/tclInt.decls: add private TclUniCharMatch function that * generic/tclIntDecls.h: does string match on counted unicode * generic/tclStubInit.c: strings. Tcl_UniCharCaseMatch has the * tests/string.test: failing that it can't handle strings or * tests/stringComp.test: patterns with embedded NULLs. Added tests that actually try strings/pats with NULLs. TclUniCharMatch should be TIPed and made public in the next minor version rev.
* execution trace, command trace and stringObj bug fixesvincentdarley2003-01-171-70/+161
|
* 3 small fixesvincentdarley2002-11-131-5/+16
|
* * tests/split.test: added 1-char string split testshobbs2002-11-121-15/+52
| | | | | | | | | * generic/tclCmdMZ.c (Tcl_SplitObjCmd): Use TclUtfToUniChar. Also added a special case for single-ascii-char splits. (Tcl_StringObjCmd): Use TclUtfToUniChar. For STR_RANGE, support getting ranges of ByteArrays (reverts change from 2000-05-26). (TraceExecutionProc) add proper static declaration.
* execution trace fixvincentdarley2002-10-151-7/+34
|
* * generic/tclBasic.c:Miguel Sofer2002-08-221-10/+19
| | | | | * generic/tclCmdMZ.c: fix for freed memory r/w in delete traces [Bug 589863], patch by Hemang Lavana.
* * generic/tclCmdMZ.c: fixing UMR in delete traces, [Bug 589863].Miguel Sofer2002-08-121-1/+3
|
* * doc/CmdCmplt.3: Applied Patch 585105 to fully CONST-ifydgp2002-08-051-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/Concat.3: all remaining public interfaces of Tcl. * doc/CrtCommand.3: Notably, the parser no longer writes on * doc/CrtSlave.3: the string it is parsing, so it is no * doc/CrtTrace.3: longer necessary for Tcl_Eval() to be * doc/Eval.3: given a writable string. Also, the * doc/ExprLong.3: refactoring of the Tcl_*Var* routines * doc/LinkVar.3: by Miguel Sofer is included, so that the * doc/ParseCmd.3: "part1" argument for them no longer needs * doc/SetVar.3: to be writable either. * doc/TraceVar.3: * doc/UpVar.3: Compatibility support has been enhanced so * generic/tcl.decls that a #define of USE_NON_CONST will remove * generic/tcl.h all possible source incompatibilities with * generic/tclBasic.c the 8.3 version of the header file(s). * generic/tclCmdMZ.c The new #define of USE_COMPAT_CONST now does * generic/tclCompCmds.c what USE_NON_CONST used to do -- disable * generic/tclCompExpr.c only those new CONST's that introduce * generic/tclCompile.c irreconcilable incompatibilities. * generic/tclCompile.h * generic/tclDecls.h Several bugs are also fixed by this patch. * generic/tclEnv.c [Bugs 584051,580433] [Patches 585105,582429] * generic/tclEvent.c * generic/tclInt.decls * generic/tclInt.h * generic/tclIntDecls.h * generic/tclInterp.c * generic/tclLink.c * generic/tclObj.c * generic/tclParse.c * generic/tclParseExpr.c * generic/tclProc.c * generic/tclTest.c * generic/tclUtf.c * generic/tclUtil.c * generic/tclVar.c * mac/tclMacTest.c * tests/expr-old.test * tests/parseExpr.test * unix/tclUnixTest.c * unix/tclXtTest.c * win/tclWinTest.c
* * generic/tclCmdMZ.c (Tcl_RegexpObjCmd): get the resultPtr againhobbs2002-06-191-1/+4
| | | | | as the Tcl_ObjSetVar2 may cause the result to change. [Patch #558324] (watson)
* * doc/CrtTrace.3: Added TIP#62 implementation of commandhobbs2002-06-171-22/+753
| | | | | | | | | | | | | | | * doc/trace.n: execution tracing [FR #462580] (lavana). * generic/tcl.h: This includes enter/leave tracing as well * generic/tclBasic.c: as inter-procedure stepping. * generic/tclCmdMZ.c: * generic/tclCompile.c: * generic/tclExecute.c: * generic/tclInt.decls: * generic/tclInt.h: * generic/tclIntDecls.h: * generic/tclStubInit.c: * generic/tclVar.c: * tests/trace.test:
* TIP#102 implementation: 'trace list' becomes 'trace info'dkf2002-06-141-15/+15
|
* * generic/tclExecute.c (TclExecuteByteCode INST_STR_CMP):hobbs2002-05-301-9/+7
| | | | | | | * generic/tclCmdMZ.c (Tcl_StringObjCmd): changed the case for choosing the Tcl_UniCharNcmp compare to when both objs are of StringType, as benchmarks show that is the optimal check (both bigendian and littleendian systems).
* Made Tcl_UniCharNcmp faster on big-endian machines; the system memcmp()isdkf2002-05-291-2/+2
| | | | | probably optimized far in excess of anything we could do! Little-endian just use the old code...
* * generic/tclInt.decls:hobbs2002-05-291-106/+62
| | | | | | | | | | | | | | | | | | | | | | | * generic/tclIntDecls.h: * generic/tclStubInit.c: * generic/tclUtf.c: added TclpUtfNcmp2 private command that mirrors Tcl_UtfNcmp, but takes n in bytes, not utf-8 chars. This provides a faster alternative for comparing utf strings internally. (Tcl_UniCharNcmp, Tcl_UniCharNcasecmp): removed the explicit end of string check as it wasn't correct for the function (by doc and logic). * generic/tclCmdMZ.c (Tcl_StringObjCmd): reworked the string equal comparison code to use TclpUtfNcmp2 as well as short-circuit for equal objects or unequal length strings in the equal case. Removed the use of goto and streamlined the other parts. * generic/tclExecute.c (TclExecuteByteCode): added check for object equality in the comparison instructions. Added short-circuit for != length strings in INST_EQ, INST_NEQ and INST_STR_CMP. Reworked INST_STR_CMP to use TclpUtfNcmp2 where appropriate, and only use Tcl_UniCharNcmp when at least one of the objects is a Unicode obj with no utf bytes.
* Partial resolution of Bug #536831; the comment is a bit clearer!dkf2002-04-181-2/+10
|
* * Corrected [subst] so that return codesdgp2002-04-051-3/+9
| | | | | | TCL_BREAK and TCL_CONTINUE returned by variable substitution have the same effect as when those codes are returned by command substitution. [Bug 536879]
* * generic/tclCmdMZ.c (Tcl_TraceObjCmd, TraceVarProc)hobbs2002-03-291-13/+23
| | | | | | | | | (TraceCommandProc, TclTraceCommandObjCmd): corrected potential double-free of traces on variables by flagging in Trace*Proc that it will free the var in case the eval wants to delete the var trace as well. [Bug #536937] Also converted Tcl_UntraceVar -> Tcl_UntraceVar2 and Tcl_Eval to Tcl_EvalEx in Trace*Proc for slight efficiency improvement.
* * Updated interfaces of generic/tclVar.c accordingdgp2002-03-201-3/+3
| | | | to TIP 27. In particular, the "part2" arguments were CONSTified.
* * generic/tclCmdMZ.c (TraceCommandProc): ensure that TraceCommandInfohobbs2002-03-011-2/+6
| | | | | structure was also deleted when a command was deleted to prevent a mem leak.
* generic/tclCmdMZ.chobbs2002-02-271-9/+10
|
* Added TIP#76 implementation, docs + tests.dkf2002-02-221-11/+19
|
* TIP#72 implementation. See ChangeLog for details.dkf2002-02-151-2/+10
| | | | | This version builds clean on Solaris/SPARC, with GCC and CC, both with and without threads and both in 32-bit and 64-bit mode.
* * Partial TIP 27 rollback. Following routinesdgp2002-02-081-2/+2
| | | | | | | | | | | | | restored to return (char *): Tcl_DStringAppend, Tcl_DStringAppendElement, Tcl_JoinPath, Tcl_TranslateFileName, Tcl_ExternalToUtfDString, Tcl_UtfToExternalDString, Tcl_UniCharToUtfDString, Tcl_GetCwd, Tcl_WinTCharToUtf. Also restored Tcl_WinUtfToTChar to return (TCHAR *) and Tcl_UtfToUniCharDString to return (Tcl_UniChar *). Modified some callers. This change recognizes that Tcl_DStrings are de-facto white-box objects. * generic/tclCmdMZ.c: corrected use of C++-style comment.
* * generic/tclCmdMZ.c (Tcl_RegsubObjCmd): added special case tohobbs2002-02-071-42/+137
| | | | | | | | search for simple 'string map' style regsub calls. Delayed creation of resultPtr object until an initial match is made, as the input string object can then be reused for no matches. (Tcl_StringObjCmd): optimization improvements to the STR_MAP algorithm for zero-length and nocase cases.
* * generic/tclCmdMZ.c (Tcl_RegexpObjCmd): handle quirky about casehobbs2002-02-021-8/+12
| | | | earlier to avoid shimmering problem.
* * Updated APIs in generic/tclCmdMZ.c according to the guidelinesdgp2002-01-211-4/+4
| | | | of TIP 27.
* * More TIP 27 updates in tclIOUtil.c and tclIndexObj.c that weredgp2002-01-171-11/+11
| | | | | | | overlooked before. Updated callers. ***POTENTIAL INCOMPATIBILITY*** Includes a source incompatibility in the tablePtr arguments of the Tcl_GetIndexFromObj* routines.
* * Updated APIs in generic/tclUtf.c and generic/tclRegexp.c accordingdgp2002-01-171-5/+5
| | | | to the guidelines of TIP 27. Updated callers.
* * typo corrections in commentsdgp2001-12-201-3/+3
|
* Tightened up the argument passing for [switch] to promote robuster scripts.dkf2001-11-271-31/+59
|
* * generic/tclBasic.c (Tcl_DeleteCommandFromToken,CallCommandTraces):dgp2001-11-211-2/+2
| | | | | | | * generic/tclCmdMZ>c (Tcl_UntraceCommand): Added Tcl_Preserve and Tcl_Release calls to prevent deletion of CommandTrace structures until all callers are done using them, preventing memory corruption. [Bug 453805]
* added TIP#73 patch #483500 from Kevin Kenny.hobbs2001-11-211-5/+5
| | | | This deprecates TclpGetTime in favor of new Tcl_GetTime.
* Changes due to TIP#68; memory handling in variable traces is now correct!dkf2001-11-191-40/+15
|
* Undo of mistaken commit. Sorry!dgp2001-10-161-5/+5
|
* * Added test to demonstrate memory corruption problems. [Bug 219393].dgp2001-10-161-5/+5
|
* removed unnecessary inclusions of tclCompile.h [Patch 466823]Miguel Sofer2001-10-011-2/+1
|
* * generic/tclCmdMZ.c (Tcl_RegsubObjCmd): had to adjust fix fromhobbs2001-09-131-15/+27
| | | | | | 2001-08-06 to actually duplicate the objects in certain cases. This is really a place where feather would have been essential. [Bug #461322]
* Patch for [TIP 56], [Bug: 219384] and [Bug: 455151]: deprecate the useMiguel Sofer2001-09-131-7/+7
| | | | of Tcl_EvalTokens, replaced by the new Tcl_EvalTokensStandard.