summaryrefslogtreecommitdiffstats
path: root/generic/tclVar.c
Commit message (Collapse)AuthorAgeFilesLines
...
* * More TIP 27 updates in tclIOUtil.c and tclIndexObj.c that weredgp2002-01-171-3/+3
| | | | | | | overlooked before. Updated callers. ***POTENTIAL INCOMPATIBILITY*** Includes a source incompatibility in the tablePtr arguments of the Tcl_GetIndexFromObj* routines.
* restored consistency in refCount accounting by array traces [Bug #4484339]Miguel Sofer2001-12-071-2/+4
|
* new algorithm for [array get], safe when there are traces that modify the ↵Miguel Sofer2001-12-051-8/+67
| | | | array [Bug #449893].
* Tcl_Preserve'ing VarTrace structures to avoid memory corruption [Bug: 484334]Miguel Sofer2001-11-301-6/+14
|
* Changes due to TIP#68; memory handling in variable traces is now correct!dkf2001-11-191-34/+219
|
* Reference implementation of TIP's #22, #33 and #45. Adds thehobbs2001-11-141-2/+3
| | | | | | ability of the [lindex] command to have multiple index arguments, and adds the [lset] command. Both commands are byte-code compiled. [Patch #471874] (work by Kenny, commited by Hobbs)
* * tests/var.test:dgp2001-11-091-2/+2
| | | | | * generic/tclVar.c: Corrected bug in [global] when dealing with variable names matching :*. [Bug 480176]
* * Updated APIs indgp2001-09-271-7/+7
| | | | | generic/tclProc.c and generic/tclVar.c according to the guidelines of TIP 27. [Patch 465442]
* * generic/tclVar.c: removed comments referring to unused flag TCL_PARSE_PART1.Miguel Sofer2001-09-251-6/+4
|
* insure that [array] traces work for undefined vars [bug: 449094]Miguel Sofer2001-08-101-8/+14
|
* * tests/var.test:hobbs2001-07-041-1/+6
| | | | | * generic/tclVar.c (Tcl_VariableObjCmd): added patch to check for number of args. [Patch #426038]
* * generic/tclVar.c (Tcl_GetVar2Ex): added ability to recognizehobbs2001-07-031-17/+64
| | | | | | | | | | | TCL_TRACE_READS flags to cause creation of part1 in TclLookupVar to make sure newly created array will get read traces triggered appropriately. This is called by Tcl_ObjGetVar2, Tcl_GetVar, and Tcl_GetVar2. (TclSetIndexedScalar, TclSetElementOfIndexedArray): added read trace triggering for lappend case. (Tcl_LappendObjCmd): pass TCL_TRACE_READS to Tcl_ObjGetVar2 to trigger possible read traces for new arrays.
* [Patch #424851]: Faster array searching & obj cleanupMiguel Sofer2001-05-261-27/+116
|
* * generic/tclBasic.c: added new CompileProc invocations to basichobbs2001-05-171-82/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | command initialization. * generic/tclCompCmds.c: added new compile commands for append, lappend, lindex and llength. Refactored set and incr compile commands to use new TclPushVarName function for handling the varname component during compilation (also used by append and lappend). Changed string compile command to compile toplevel code as well (when possible). * generic/tclCompile.c: added new instruction enums * generic/tclCompile.h: added debug info for new instructions * generic/tclExecute.c (TclExecuteByteCode): moved elemPtr to toplevel var (oft-used). Added definitions for new bytecode instructions INST_LIST_INDEX, INST_LIST_LENGTH, INST_APPEND_SCALAR1, INST_APPEND_SCALAR4, INST_APPEND_ARRAY1, INST_APPEND_ARRAY4, INST_APPEND_ARRAY_STK, INST_APPEND_STK, INST_LAPPEND_SCALAR1, INST_LAPPEND_SCALAR4, INST_LAPPEND_ARRAY1, INST_LAPPEND_ARRAY4, INST_LAPPEND_ARRAY_STK, INST_LAPPEND_STK. Refactored repititious code for reuse with INST_LOAD_STK (same as INST_LOAD_SCALAR_STK), INST_STORE_STK (same as INST_STORE_SCALAR_STK). Updated INST_STR_CMP with style of fix of 2001-04-06 Fellows [Bug #219201] as that fix only affected the runtime eval'ed "string" (string compare is normally byte-compiled now). We may want to back these out for speed in the future, noting the problems with \x00 comparisons in the docs. * generic/tclInt.h: declarations for new compile commands. * generic/tclVar.c: change TclGetIndexedScalar, TclGetElementOfIndexedArray, TclSetElementOfIndexedArray and TclSetIndexedScalar to use flags. The Set functions now support TCL_APPEND_ELEMENT and TCL_LIST_ELEMENT as well. * generic/tclInt.decls: * generic/tclIntDecls.h: minor signature changes for above.
* Added several missing CONSTs in calls to TclGetNamespaceForQualNameKevin B Kenny2001-04-271-3/+3
|
* * generic/tclVar.c (Tcl_ArrayObjCmd): Corrected retrieval ofhobbs2001-03-241-2/+9
| | | | resultPtr to prevent possible corruption.
* Made [unset] command behave as documented when no arguments present.dkf2001-03-131-2/+8
|
* Fixed two faults with [unset -nocomplain]; one with a possible overrundkf2001-03-061-11/+17
| | | | of the argument array, and another with the documentation.
* Finally fixed bug 119192. This was a real nasty that was hidden bydkf2000-11-171-24/+15
| | | | | | | the fact that it never caused a crash and was blocked most of the time from coming into play by the way the compiler handles array variable references. (Yes, the test suite does pass now on this machine at least...)
* * generic/tclVar.c (TclLookupVar): reverted fix below as it brokehobbs2000-11-151-9/+9
| | | | all other array unset error reporting. Bug-119192 is still open.
* Fixed bug 119192 which was causing variable names to be reporteddkf2000-11-151-9/+9
| | | | incorrectly in some circumstances.
* * generic/tclVar.c (TclVarTraceExists): Corrected excessive memhobbs2000-11-011-18/+17
| | | | | use when info exists was called on a non-existent array element. [BUG: 119213, 119336]
* * tests/trace.test: Extended array tracing tests.ericm2000-08-251-2/+3
| | | | | | | | | | * doc/trace.n: Clarified information about when array traces will be fired. * generic/tclVar.c (Tcl_ArrayObjCmd): Corrected call to CallTraces (for TCL_TRACE_ARRAY) to only be called when the variable is either an array or is undefined, to ensure that array traces do not fire for scalar variables.
* * doc/trace.n: Updated documentation for new syntax; flagged oldericm2000-08-251-15/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | syntax as deprecated; added documentation for command rename/delete traces and variable array traces. * tests/trace.test: Updated tests for new trace syntax; new tests for command rename/delete traces; new tests for array traces. * generic/tclVar.c: Support for new trace syntax; support for TCL_TRACE_ARRAY. * generic/tclStubInit.c: * generic/tclDecls.h: * generic/tcl.decls: Stub functions for command rename/delete traces. * generic/tcl.h: * generic/tclInt.h: * generic/tclBasic.c: Support for command traces. * generic/tclCmdMZ.c (TclTraceVariableObjCmd): Patched to support new [trace] syntax: trace {add|remove|list} {variable|command} name ops command Added support for command traces (rename, delete operations). Added support for TCL_TRACE_ARRAY at Tcl level (array operation for variable traces).
* Added check for non-arrays for [array statistics].ericm2000-08-211-1/+6
|
* * generic/tclVar.c (CallTraces): Added check for VAR_TRACE_ACTIVEericm2000-07-251-2/+2
| | | | | | | on the array containing the variable before executing traces on that array, to conform with normal variable traces and the documentation, which states that while executing a trace, other traces on that variable are disabled. [Bug: 6049].
* * tests/set-old.test:hobbs2000-06-011-7/+23
| | | | | | * doc/unset.n: * generic/tclVar.c (Tcl_UnsetObjCmd): added -nocomplain and -- options to unset, to allow for a silent unset operation.
* * generic/tclVar.c (Tcl_ArrayObjCmd): Added support for regexp andericm2000-05-311-6/+37
| | | | | | | | | | exact matching for [array names] command. [RFE: 3684]. * doc/array.n: Added documentation for [array names -exact/-regexp/-glob] [RFE: 3684]. * tests/set-old.test: Added tests for [array names -exact/-regexp/-glob] [RFE: 3684].
* * tests/set-old.test:ericm2000-05-081-4/+19
| | | | | * doc/array.n: * generic/tclVar.c: Added [array statistics] command [RFE: 4557]
* * var.test: Added tests for corrected variable behavior (bug #981).ericm2000-01-211-1/+12
| | | | | | | | | | * upvar.n: Expanded explanation of upvar behavior with respect to variable traces. (bugs 3917 1433 2110). * tclVar.c: Changed behavior of variable command when name refers to an element in an array (ie, "variable foo(x)") to always return an error, regardless of existance of that element in the array (now behavior is consistant with docs too) (bug #981).
* * tests/var.test: Added a test for the array multiple deleteericm2000-01-151-1/+16
| | | | | | | | | | | protection in Tcl_UnsetVar2. * generic/tclVar.c: Added protection in Tcl_UnsetVar2 against attempts to multiply delete arrays when unsetting them (bug #3453). This could happen if there was an unset trace on an array element and the trace proc made a global or upvar link to the array, and then the array was unset at the global level. See the bug reference for more information.
* * generic/tclNamesp.c:hobbs1999-10-051-5/+5
| | | | | | | * generic/tclVar.c: * generic/tclCmdIL.c: fixed comment typos * generic/tcl.h: * library/init.tcl: updated to 8.3a1 from 8.2.0.
* 1999-09-16 Jeff Hobbs <hobbs@scriptics.com>hobbs1999-09-211-8/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/timer.test: changed after delay in timer test 6.29 from 1 to 10. [Bug: 2796] * tests/pkg.test: * generic/tclPkg.c: fixed package version check to disallow 1.2..3 [Bug: 2539] * unix/Makefile.in: fixed gendate target - this never worked since RCS was intro'd. * generic/tclGetDate.y: updated to reflect previous changes to tclDate.c (leap year calc) and added CEST and UCT time zone recognition. Fixed 4 missing UCHAR() casts. [Bug: 2717, 954, 1245, 1249] * generic/tclCkalloc.c: changed Tcl_DumpActiveMemory to really dump to stderr and close it [Bug: 725] and changed Tcl_Ckrealloc and Tcl_Ckfree to not bomb when NULL was passed in [Bug: 1719] and changed Tcl_Alloc, et al to not panic when a alloc request for zero came through and NULL was returned (valid on AIX, Tru64) [Bug: 2795, etc] * tests/clock.test: * doc/clock.n: * generic/tclClock.c: added -milliseconds switch to clock clicks to guarantee that the return value of clicks is in the millisecs granularity [Bug: 2682, 1332] 1999-09-15 Jeff Hobbs <hobbs@scriptics.com> * generic/tclIOCmd.c: fixed potential core dump in conjunction with stacked channels with result obj manipulation in Tcl_ReadChars [Bug: 2623] * tests/format.test: * generic/tclCmdAH.c: fixed translation of %0#s in format [Bug: 2605] * doc/msgcat.n: fixed \\ bug in example [Bug: 2548] * unix/tcl.m4: * unix/aclocal.m4: added fix for FreeBSD-[1-2] recognition [Bug: 2070] and fix for IRIX SHLIB_LB_LIBS. [Bug: 2610] * doc/array.n: * tests/var.test: * tests/set.test: * generic/tclVar.c: added an array unset operation, with docs and tests. Variation of [Bug: 1775]. Added fix in TclArraySet to check when trying to set in a non-existent namespace. [Bug: 2613] 1999-09-14 Jeff Hobbs <hobbs@scriptics.com> * tests/linsert.test: * doc/linsert.n: * generic/tclCmdIL.c: fixed end-int interpretation of linsert to correctly calculate value for end, added test and docs [Bug: 2693] * doc/regexp.n: * doc/regsub.n: * tests/regexp.test: * generic/tclCmdMZ.c: add -start switch to regexp and regsub with docs and tests * doc/switch.n: added proper use of comments to example. * generic/tclCmdMZ.c: changed switch to complain when an error occurs that seems to be due to a misplaced comment. * generic/tclCmdMZ.c: fixed illegal ref for \[0-9] substitutions in regsub [Bug: 2723] * generic/tclCmdMZ.c: changed [string equal] to return an Int type object (was a Boolean)
* 1 Added use of Tcl_GetAllocMutex to tclAlloc.c and tclCkalloc.c so theywelch1999-08-101-1/+65
| | | | | | | | can be linked against alternate thread packages. 2 Added Tcl_GetChannelNames to tclIO.c 3 Added TclVarTraceExists hook so "info exists" triggers read traces exactly like it did in Tcl 7.6 4 Stubs table changes to reflect new internal and external APIs
* * Changed version to 8.2b2.redman1999-07-221-2/+17
| | | | | | | | | | | | | | | | | | * win/tclWinPort.h: Block out include of sys/*.h in order to build extensions with MetroWerks compiler for Win32. [Bug: 2385] * generic/tclCmdMZ.c: * generic/tclIO.c: Fix ANSI-style prototypes based on patch from Ulrich Ring. [Bug: 2391] * unix/Makefile.in: Need to make install-sh executable before calling (with chmod +x). [Bug: 2413] * tests/var.test: * generic/tclVar.c: Fixed bug that caused a seg. fault when using "array set a(b) {}", which is a bad array name anyway. Now the "array set" command will return an error in this case. Added test case and fixed existing test. [Bug: 2427]
* * generic/tclVar.c (Tcl_VariableObjCmd): fixed premature incrementhershey1999-06-171-3/+3
| | | | in loop that was causing out-of-bounds reads on array "varName".
* * tests/string.test:hershey1999-06-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | * generic/tclVar.c (Tcl_SetVar2Ex): * generic/tclStringObj.c (Tcl_AppendObjToObj): * generic/tclCmdMZ.c (Tcl_StringObjCmd): optimized the string index, string length, string range, and append command in cases where the object's internal rep is a bytearray. Objects with other internal reps are converted to have the new unicode internal rep. * unix/Makefile.in: * win/Makefile.in: * win/Makefile.vc: * tests/unicode.test: * generic/tclInt.h: * generic/tclObj.c: * generic/tclUnicodeObj.c: added a new object type to store the unicode representation of a string. * generic/tclTestObj.c: added the objtype option to the testobj command. This option returns the name of the type of internal rep an object has.
* merged tcl 8.1 branch back into the main trunkstanton1999-04-161-350/+365
|
* * generic/tclProc.c:stanton1999-02-031-123/+145
| | | | | | | | | | | | | | | | | | | | | | * generic/tclNamesp.c: * generic/tclInt.h: * generic/tclCmdIL.c: * generic/tclBasic.c: * generic/tclVar.c: Applied patch from Viktor Dukhovni to rationalize TCL_LEAVE_ERR_MSG behavior when creating variables. * generic/tclVar.c: Fixed bug in namespace tail computation. Fixed bug where upvar could resurrect a namespace variable whose namespace had been deleted. * generic/tclCompile.c (TclCompileExprCmd): Eliminated yet another bogus optimization in expression compilation. * generic/tclCompile.c (CompileExprWord): Fixed exception stack overflow bug caused by missing statement. [Bug: 928] * generic/tclIOCmd.c: * generic/tclBasic.c: Objectified the "open" command. [Bug: 1113]
* eliminated purify warning and other lintstanton1998-11-191-5/+3
|
* Replaced SCCS strings, fixed binary filescore_8_0_3stanton1998-09-141-1/+1
|
* replaced isArg/isTemp with flagsstanton1998-08-071-2/+2
|
* incr tcl updtaeswelch1998-06-281-1/+45
|
* fixed behavior of "array set" on initialization with an emtpy liststanton1998-06-181-33/+57
| | | | removed memory leak
* Initial revisionrjohnson1998-03-261-0/+4552