summaryrefslogtreecommitdiffstats
path: root/generic/tclVar.c
Commit message (Collapse)AuthorAgeFilesLines
* * generic/tclClock.c: Removed some dead code.dgp2005-10-191-325/+1
| | | | | | | | | | | | * generic/tclCmdIL.c: * generic/tclCompCmds.c: * generic/tclDictObj.c: * generic/tclExecute.c: * generic/tclLiteral.c: * generic/tclParseExpr.c: * generic/tclScan.c: * generic/tclUtil.c: * generic/tclVar.c:
* TIP#237 IMPLEMENTATIONdgp2005-10-081-1/+130
| | | | | | [kennykb-numerics-branch] Resynchronized with the HEAD; at this checkpoint [-rkennykb-numerics-branch-20051008], the HEAD and kennykb-numerics-branch contain identical code.
* Getting more systematic about styledkf2005-07-231-18/+28
|
* Style-guide reformat and get rid of gcc warningdkf2005-07-051-1360/+1355
|
* * generic/tclInt.h: Reduced the Tcl_ObjTypes "index",dgp2005-06-071-6/+6
| | | | | | | * generic/tclIndexObj.c: "enembleCmd", "localVarName", and * generic/tclNamesp.c: "levelReference" to file static scope. * generic/tclProc.c: * generic/tclVar.c:
* Merged kennykb-numerics-branch back to the head; TIPs 132 and 232Kevin B Kenny2005-05-101-1/+1
|
* * generic/tclInt.decls: Converted TclMatchIsTrivial to a macro.dgp2005-05-051-2/+41
| | | | | | | | | | | | | | * generic/tclInt.h: * generic/tclUtil.c: * generic/tclIntDecls.h: `make genstubs` * generic/tclStubInit.c: * generic/tclBasic.c: Added callers of TclMatchIsTrivial where * generic/tclCmdIL.c: a search can be done more efficiently * generic/tclCompCmds.c:when it is recognized that a pattern match * generic/tclDictObj.c: is really an exact match. [Patch 1076088] * generic/tclIO.c: * generic/tclNamesp.c: * generic/tclVar.c:
* * generic/Var.c (Tcl_ArrayObjCmd - ARRAY_NAMES): fix Tcl_Obj leakMiguel Sofer2005-04-161-2/+2
| | | | [Bug 1084111]
* * generic/tclVar.c: converted a few function calls to macros.Miguel Sofer2005-04-031-23/+23
|
* Changed the internal representation of lists to (a) reduce the malloc/freeMiguel Sofer2005-04-021-54/+12
| | | | | | | | calls at list creation (from 2 to 1), (b) reduce the cost of handling empty lists (we now never create a list internal rep for them), (c) allow refcounting of the list internal rep. The latter permits insuring that the pointers returned by Tcl_ListObjGetElements remain valid even if the object shimmers away from its original list type. This is [Patch 1158008]
* changing the isProcCallFrame field of the CallFrame struct from a 0/1 fieldMiguel Sofer2004-12-141-10/+11
| | | | to flags. Should be perfectly backwards compatible.
* * generic/tclVar.c (TclArrayObjCmd - ARRAY_NAMES): leaking an object [BugMiguel Sofer2004-12-131-1/+2
| | | | 1084111] - thanks to Rolf Ade.
* * generic/tclInt.h: Moved verification of ptrdiff_t typedef fromdgp2004-11-121-7/+1
| | | | | * generic/tclExecute.c: multiple .c files into one common header where * generic/tclVar.c: it is verifiably after tclConfig.h inclusion.
* Allow ensembles to rewrite their subcommands' error messages to be moredkf2004-10-291-9/+5
| | | | | | relevant to users. [Patch 1056864] Also patches to core to take advantage of this Also other general cleaning up of Tcl_WrongNumArgs usage
* removed more direct references to the VAR flags, replaced with accessMiguel Sofer2004-10-261-10/+10
| | | | macros.
* * generic/tclVar.c: fixed bug in commit of 2004-07-23, which wasMiguel Sofer2004-10-221-4/+1
| | | | | | causing a leak of Proc structures and failure of compile-12.1. Two lines were 'zombies' from the previous way localVarNames worked. Credit dgp for finding this.
* * generic/tclBasic.c:dgp2004-10-061-26/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclBinary.c: * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclCompExpr.c: * generic/tclDictObj.c: * generic/tclEncoding.c: * generic/tclExecute.c: * generic/tclFCmd.c: * generic/tclHistory.c: * generic/tclIndexObj.c: * generic/tclInterp.c: * generic/tclIO.c: * generic/tclIOCmd.c: * generic/tclNamesp.c: * generic/tclObj.c: * generic/tclPkg.c: * generic/tclResult.c: * generic/tclScan.c: * generic/tclTimer.c: * generic/tclTrace.c: * generic/tclUtil.c: * generic/tclVar.c: It is a poor practice to directly set or append to the value of the objResult of an interp, because that value might be shared, and in that circumstance a Tcl_Panic() will be the result. Searched for example of this practice and replaced with safer alternatives, often using the Tcl_AppendResult() routine that dkf just rehabilitated.
* Tcl_GetString -> TclGetStringdkf2004-10-061-11/+11
|
* Speed up [upvar] and [uplevel] by not forcing level references to be parseddkf2004-10-011-4/+3
| | | | as strings every time through. [Patch 1037357]
* Factorize out the code for freeing an object's internal rep.dkf2004-09-291-12/+6
|
* Completed an incomplete undo of a mistaken commit that broke the HEAD.dgp2004-08-311-9/+9
|
* Undo mistaken commit of code in sandbox. <:} D'oh!dkf2004-08-311-111/+3
|
* Grammar and spelling fixes. [Patch 1018486]dkf2004-08-311-11/+119
|
* fix for [Bug 1008314]Miguel Sofer2004-08-161-3/+6
|
* * generic/tclVar.c: simplify tclLocalVarNameType, removing theMiguel Sofer2004-07-231-68/+39
| | | | | | reference to the corresponding proc. The reference is now seen as unnecessary, and it may cause leaking circular references under some circumstances (see for example [Bug 994838]).
* better (?) #ifdeferry for the last fixMiguel Sofer2004-05-271-1/+6
|
* * generic/tclExecute.c:Miguel Sofer2004-05-271-4/+5
| | | | | * generic/tclVar.c: using (ptrdiff_t) instead of (int) casting to correct compiler warnings [Bug 961657], reported by Bob Techentin.
* Made compiling with -Wstrict-prototypes -Wmissing-prototypes much cleaner.dkf2004-05-271-3/+4
| | | | Also added support for [FRQ 951168] but left that switched off by default.
* * generic/tclNamesp.c (Tcl_FindNamespaceVar):Miguel Sofer2004-05-251-2/+21
| | | | | | | | | | | | | | | | * tests/namespace.test (namespace-17.10-12): reverted commit of 2004-05-23 and removed the tests, as it interferes with the varname resolver and there are apps that break (AlphaTk). A fix will have to wait for Tcl9. * generic/tclVar.c: Caching of namespace variables disabled: no simple way was found to avoid interfering with the resolver's idea of variable existence. A cached varName may keep a variable's name in the namespace's hash table, which is the resolver's criterion for existence. * tests/namespace.c (namespace-17.10): testing for interference between varname caching and name resolver.
* * generic/tclNamesp.c (Tcl_FindNamespaceVar): [Bug 959052] fixed,Miguel Sofer2004-05-231-17/+5
| | | | | | | insuring that no "zombie" variables are found. * generic/tclVar.c (TclLookupSimpleVar): comments re [Bug 736729] (predecessor of [Bug 959052]) removed. * tests/namespace.test: added tests 17.10-12
* * generic/tclVar.c (TclObjLookupVar, TclObjUnsetVar2): fix for newMiguel Sofer2004-05-221-12/+30
| | | | | | | | (in tcl8.4) exteriorisations of [Bug 736729] due to the use of tclNsVarNameType obj types. Reenabling the use of this objType ("VAR ref absolute" benchmark down to 66 ms, from 230). Added comments in TclLookupSimpleVar explaining my current understanding of [Bug 736729].
* * generic/tclVar.c: fix for [Bug 735335]. The use ofMiguel Sofer2004-05-221-21/+24
| | | | | tclNsVarNameType objs is still disabled, pending resolution of [Bug 736729].
* * doc/global.n:Miguel Sofer2004-04-281-1/+25
| | | | | | | | * doc/upvar.n: * generic/tclVar.c (ObjMakeUpvar): * tests/upvar.test (upvar-8.11): * tests/var.test (var-3.11): Avoid creation of unusable variables: [Bug 600812] [TIP 184].
* Patch 922727 committed. Implements three changes:dgp2004-04-061-2/+1
| | | | | | | | | | | | | | | | | | | | | | | * generic/tclInt.h: Reworked the Tcl header files into a clean * unix/tclUnixPort.h: hierarchy where tcl.h < tclPort.h < tclInt.h * win/tclWinInt.h: and every C source file should #include * win/tclWinPort.h: at most one of those files to satisfy its declaration needs. tclWinInt.h and tclWinPort.h also better organized so that tclWinPort.h includes the Windows implementation of cross-platform declarations, while tclWinInt.h makes declarations that are available on Windows only. * generic/tclBinary.c (TCL_NO_MATH): Deleted the generic/tclMath.h * generic/tclMath.h (removed): header file. The internal Tcl * macosx/Makefile (PRIVATE_HEADERS): header, tclInt.h, has a * win/tcl.dsp: #include <math.h> directly, and file external to Tcl needing libm should do the same. * win/Makefile.in (WIN_OBJS): Deleted the win/tclWinMtherr.c file. * win/makefile.bc (TCLOBJS): It's a vestige from matherr() days * win/makefile.vc (TCLOBJS): gone by. * win/tcl.dsp: * win/tclWinMtherr.c (removed):
* All uses of 'panic' (the macro) changeddavygrvy2003-12-241-3/+3
| | | | | | | to 'Tcl_Panic' (the function). The #define of panic in tcl.h clearly states it is deprecated in the comments. [Patch 865264]
* * generic/tclVar.c: fix flag bit collision betweenMiguel Sofer2003-11-201-2/+6
| | | | LOOKUP_FOR_UPVAR and TCL_PARSE_PART1 (deprecated) [Bug 835020]
* Made [array get] return a dictionary, and allowed [array set] to accept onedkf2003-07-031-30/+83
| | | | | without having to convert it to a list (though lists are still preferred.) [Bug 759935]
* More trace factoring - variable traces are the target this time.dkf2003-06-261-742/+55
|
* * generic/tclVar.c (TclObjLookupVar): [Bug 735335] temporary fix,Miguel Sofer2003-05-121-1/+13
| | | | | disabling usage of tclNsVarNameType. * tests/var.test (var-15.1): test for [Bug 735335]
* Made [incr] able to accept and work with wide increments [Bug 728838]dkf2003-04-281-1/+158
|
* * generic/tcl.h Made changes so that the "wideInt" Tcl_ObjTypedgp2003-04-161-12/+3
| | | | | | | | | | | | | | | | | | | | | | * generic/tclObj.c is defined on all platforms, even those where * generic/tclPort.h TCL_WIDE_INT_IS_LONG is defined. Also made the Tcl_Value struct have a wideValue field on all platforms. This is a ***POTENTIAL INCOMPATIBILITY*** for TCL_WIDE_INT_IS_LONG platforms because that struct changes size. This is the same TIP 72 incompatibility that was seen on other platforms at the 8.4.0 release, when this change should have happened as well. [Bug 713562] * generic/tclInt.h: New internal macros TclGetWide() and TclGetLongFromWide() to deal with both forms of the "wideInt" Tcl_ObjType, so that conditional TCL_WIDE_INT_IS_LONG code is confined to the header file. * generic/tclCmdAH.c: Replaced most coding that was conditional * generic/tclCmdIL.c: on TCL_WIDE_INT_IS_LONG with code that * generic/tclExecute.c: works across platforms, sometimes using * generic/tclTest.c: the new macros above to do it. * generic/tclUtil.c: * generic/tclVar.c:
* * generic/tclVar.c:Miguel Sofer2003-03-241-18/+42
| | | | | * tests/var.test: fixing ObjMakeUpvar's lookup algorithm for the created local variable, bugs #631741 and #696893.
* * generic/tclVar.c (DisposeTraceResult, CallVarTraces): add properhobbs2002-11-121-3/+3
| | | | static declarations.
* * generic/tclVar.c: Fixed code that check for proper # of args todgp2002-10-171-2/+2
| | | | * tests/var.test: [array names]. Added test. [Bug 624755]
* * generic/tclVar.c (TclDeleteVars): Corrected logic for setting thedgp2002-09-051-2/+5
| | | | TCL_INTERP_DESTROYED flag when calling variable traces. [Tk Bug 605121]
* * generic/tclVar.c (DeleteArray): leak plug [Bug 604239]. ThanksMiguel Sofer2002-09-041-1/+14
| | | | to dkf and dgp for the long and difficult discussion in the chat.
* (Tcl_UpVar2): code cleanup to not use gotohobbs2002-09-031-9/+6
|
* * generic/tclVar.c (Tcl_UpVar2): a Tcl_Obj was being leaked onMiguel Sofer2002-09-031-2/+4
| | | | error return from TclGetFrame.
* * doc/CmdCmplt.3: Applied Patch 585105 to fully CONST-ifydgp2002-08-051-47/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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/tclVar.c (TclObjLookupVar): leak fix and improvedMiguel Sofer2002-07-271-19/+26
| | | | comments.