summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdMZ.c
Commit message (Collapse)AuthorAgeFilesLines
* * 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]. FossilOrigin-Name: a32f24e76c41ce5cac687595ad2450339b8cc8f8
* [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. FossilOrigin-Name: e09d290d78d358bdb642204b2e1d794f4f93e953
* * 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: FossilOrigin-Name: a88d79cbf88f04a3f3918625a36a4df1d75704a2
* * generic/tclCmdMZ.c: Stop some interference between enter tracesdgp2006-04-111-5/+10
| | | | | | * tests/trace.test: and enterstep traces. [Bug 1458266] FossilOrigin-Name: f97f588d8c530014989abfb66765957c4458b30d
* * generic/tclBasic.c (Tcl_DeleteCommandFromToken):msofer2005-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]. FossilOrigin-Name: 56a462e45ca6948aca94cef4232dec3080078aa1
* Fix [Bug 1348775] using Miguel's patchdkf2005-11-081-17/+44
| | | FossilOrigin-Name: 23f9e4bd609edb047f2e3849900975002b4ca5a4
* * 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] FossilOrigin-Name: 2a6bcd3750a89ece869c0441799767ee6087c6f4
* * generic/tclCmdMZ.c (TraceVarProc): [Bug 1337229], partialmsofer2005-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. FossilOrigin-Name: 8e9ed63a056d38b4358a5c3dbb90b3cfd85bc06e
* * generic/tclBasic.c:msofer2005-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. FossilOrigin-Name: 8761ab798f625b66cadb3eaf8fafdedce6553a02
* * 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): FossilOrigin-Name: f5039da57115f31cf6d6c5a5474730c7233c7507
* * generic/tclCmdMZ.c (Tcl_TimeObjCmd): add necessary casthobbs2005-05-251-2/+3
| | | FossilOrigin-Name: 176b2864bdc774cd96124add40eac34c5de751c3
* * 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] FossilOrigin-Name: f5fb72c5f99567926c50ce00f6e467059b70e13d
* * 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. FossilOrigin-Name: 8a6c6f6b7db665360165609bb093dc7729d80d11
* * generic/tclCmdMZ.c: Corrected intrep-dependence ofdgp2005-04-221-9/+3
| | | | | | * tests/string.test: [string is boolean] [Bug 1187123] FossilOrigin-Name: 8c298ec89cec67a299becb8e763550d6c47b53e3
* * 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] FossilOrigin-Name: e64996b96be1348a3e8dc234c82ced8a96d485dd
* * 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] FossilOrigin-Name: 5e6df95dbf0fc88c3f9b4906aa393103ecf055e8
* * 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. FossilOrigin-Name: 0c5016cb647bbe0a800b39b204726d074cc21543
* Fix crash in [string map] when objects are shared. [Bug 1018562]dkf2004-08-301-5/+21
| | | FossilOrigin-Name: 0a400ea11f6cfb6c2399e4c7ce867d935696e4e3
* * 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] FossilOrigin-Name: af732ef905064138b979d8b449ff93b52626e8db
* * generic/tclCmdMZ.c (TclTraceExecutionObjCmd)hobbs2004-02-171-6/+4
| | | | | | (TclTraceCommandObjCmd): fix possible mem leak in trace info. FossilOrigin-Name: ec54906e57c27dcaa452350bd8c05a091a900317
* regsub fixvincentdarley2003-10-141-2/+13
| | | FossilOrigin-Name: 5f7f128188d9650dc86bfe01049564dc28414056
* * 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]. FossilOrigin-Name: d827d182f44e9b2b0f98c454da8b033825048ddd
* * 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. FossilOrigin-Name: 5e1bc3855cc6d878be767f1b5675b563f1de2bde
* Removed trivially-unreachable line [Bug 771939]dkf2003-07-161-2/+1
| | | FossilOrigin-Name: 287971e081364aec1c15a8b44f3e205f1b3f5a11
* backport of regsub empty string fixesvincentdarley2003-06-171-6/+16
| | | FossilOrigin-Name: 31ae6969b0d4739ee8549597494ab52f605bf193
* * generic/tclCmdMZ.c (Tcl_StringObjCmd): prevent string repeathobbs2003-05-101-1/+10
| | | | | | crash when overflow sizes were given (throws error). [Bug #714106] FossilOrigin-Name: 2e6f8b3c4f8c9f15914fa84426febb8b5f4dec55
* * 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. FossilOrigin-Name: c1cbd75c51a0d96a027348d34a444ad0acc07242
* * generic/tclCmdMZ.c (TraceExecutionProc): Added missingdgp2003-04-071-2/+4
| | | | | | Tcl_DiscardResult() call to avoid memory leak. FossilOrigin-Name: 1e197c79ffdbbf0aa000e002e7a2c81e2acc7972
* * 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] FossilOrigin-Name: b9c155681d9cf8cf8f5c0d268239d353cdac48ae
* * generic/tclCmdMZ.c (TraceCommandProc): Fix mem leak whenhobbs2003-02-271-1/+6
| | | | | | deleting a command that had trace on it. [Bug #693564] (sofer) FossilOrigin-Name: 8bb4478f384ce86f7f334b7af6c41da96d9ce842
* * 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. FossilOrigin-Name: 28dcdcf39e0981d8917cd869b26dbdb4c0aa8ff6
* execution trace, command trace and stringObj bug fixesvincentdarley2003-01-171-70/+161
| | | FossilOrigin-Name: bf6b0dfaf92bb241b87c9882d5d31505e5490d93
* 3 small fixesvincentdarley2002-11-131-5/+16
| | | FossilOrigin-Name: 602e2df05fd8888c0d53807ea066d4675ee13271
* * 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. FossilOrigin-Name: 5a9d0381a03dc9ad65976230f24b1f2dbce32d09
* execution trace fixvincentdarley2002-10-151-7/+34
| | | FossilOrigin-Name: 19ad8717ce5d2027738929ad566ef66a5e023902
* * generic/tclBasic.c:msofer2002-08-221-10/+19
| | | | | | | * generic/tclCmdMZ.c: fix for freed memory r/w in delete traces [Bug 589863], patch by Hemang Lavana. FossilOrigin-Name: a67b8218c5030c7792ba529ac7ece822614ec2f7
* * generic/tclCmdMZ.c: fixing UMR in delete traces, [Bug 589863].msofer2002-08-121-1/+3
| | | FossilOrigin-Name: 67642dd640064085e8cd3063c4aa5a45fd71a732
* * 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 FossilOrigin-Name: e476c22fecaa0dd7fea635d29d8ea1d5579365a1
* * 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) FossilOrigin-Name: 1a723fe8cb3db609d18319e3e423384eb766fca4
* * 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: FossilOrigin-Name: 3da5a8279575a3067e306111e9319cbfab04b326
* TIP#102 implementation: 'trace list' becomes 'trace info'dkf2002-06-141-15/+15
| | | FossilOrigin-Name: 8a0002c6e070c04c17a2f2ac092a4ffdd825b536
* * 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). FossilOrigin-Name: c3460261c45a4d45b3465a05b1323877566ad265
* 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... FossilOrigin-Name: b3535ea3919b47c72ac881fe7096124210b2d529
* * 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. FossilOrigin-Name: c78da914bed148014464cf2ed45f9ffb37c6b626
* Partial resolution of Bug #536831; the comment is a bit clearer!dkf2002-04-181-2/+10
| | | FossilOrigin-Name: 487757f636934d0772291decd2535300eb5970a8
* * 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] FossilOrigin-Name: f241a4c37d058f6673037176517f87a68a754fde
* * 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. FossilOrigin-Name: 4a46ab8262433e1866c23cc0366dac251d480501
* * Updated interfaces of generic/tclVar.c accordingdgp2002-03-201-3/+3
| | | | | | to TIP 27. In particular, the "part2" arguments were CONSTified. FossilOrigin-Name: b64c27e52d63f10977aa98296f7f47941929cfff
* * 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. FossilOrigin-Name: 076eb6a4e012a7f72e20a8b5158f3152f2d05265
* generic/tclCmdMZ.chobbs2002-02-271-9/+10
| | | FossilOrigin-Name: 199f301702017a5ffad5d28fcd98e59f75915d42