summaryrefslogtreecommitdiffstats
path: root/generic/tclVar.c
Commit message (Collapse)AuthorAgeFilesLines
...
* * generic/tclVar.c (Tcl_LappendObjCmd):Miguel Sofer2006-10-051-2/+7
| | | | | * tests/append.test(4.21-22): fix for longstanding [Bug 1570718], lappending nothing to non-list. Reported by lvirden
* Various minor object file size efficiency fixes. [Bug 1530474]dkf2006-08-101-10/+6
|
* TIP#215 IMPLEMENTATIONdgp2006-02-091-5/+5
| | | | | | | | | | * doc/incr.n: Revised [incr] to auto-initialize when varName * generic/tclExecute.c: argument is unset. [Patch 1413115]. * generic/tclVar.c: * tests/compile.test: * tests/incr-old.test: * tests/incr.test: * tests/set.test:
* Minor style fixesdkf2006-02-021-16/+15
|
* TIP#250 IMPLEMENTATIONdgp2006-02-011-20/+62
| | | | | | | | | * doc/namespace.n: New command [namespace upvar]. [Patch 1275435] * generic/tclInt.h: * generic/tclNamesp.c: * generic/tclVar.c: * tests/namespace.test: * tests/upvar.test:
* * unix/tcl.m4 (Darwin): add 64bit support, check for Tiger copyfile(),das2005-11-271-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add CFLAGS to SHLIB_LD to support passing -isysroot in env(CFLAGS) to configure (flag can't be present twice, so can't be in both CFLAGS and LDFLAGS during configure), don't use -prebind when deploying on 10.4, define TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING (rdar://3171542). (SC_ENABLE_LANGINFO, SC_TIME_HANDLER): add/fix caching, fix obsolete autoconf macros. Sync with tk/unix/tcl.m4. * unix/configure.in: fix obsolete autoconf macros, sync gratuitous formatting/ordering differences with tk/unix/configure.in. * unix/Makefile.in: add CFLAGS to tclsh/tcltest link to make executable linking the same as during configure (needed to avoid loosing any linker relevant flags in CFLAGS, in particular flags that can't be in LDFLAGS). Avoid concurrent linking of tclsh and compiling of tclTestInit.o or xtTestInit.o during parallel make. (checkstubs, checkdoc, checkexports): dependency and Darwin fixes (dist): add new macosx files. * unix/tclLoadDyld.c (TclpDlopen): use NSADDIMAGE_OPTION_WITH_SEARCHING on second NSAddImage only. [Bug 1204237] (TclGuessPackageName): should not be MODULE_SCOPE. (TclpLoadMemory): ppc64 and endian (i386) fixes, add support for loading universal (fat) bundles from memory. * unix/tclUnixFCmd.c: * macosx/tclMacOSXFCmd.c: ppc64 and endian (i386) fixes. (TclMacOSXCopyFileAttributes): add support for new Tiger copyfile() API to enable copying of xattrs & ACLs by [file copy]. * generic/tcl.h: add Darwin specifc configure overrides for TCL_WIDE defines to support fat compiles of ppc and ppc64 at the same time, (replaces Darwin CVS fix by emoy, rdar://3693001). add/correct location of version numbers in macosx files. * generic/tclInt.h: clarify fat compile comment. * unix/tclUnixPort.h: add Darwin specifc configure overrides to support fat compiles, where configure runs only once for multiple architectures (replaces Darwin CVS fix by emoy, rdar://3693001). * macosx/tclMacOSXBundle.c: * macosx/tclMacOSXNotify.c: * unix/tclUnixNotfy.c: * unix/tclUnixPort.h: fix #include order to support compile time override of HAVE_COREFOUNDATION in tclUnixPort.h when building for ppc64 * macosx/Tcl.pbproj/default.pbxuser (new file): * macosx/Tcl.pbproj/jingham.pbxuser: * macosx/Tcl.pbproj/project.pbxproj: * macosx/Tcl.xcode/default.pbxuser (new file): * macosx/Tcl.xcode/project.pbxproj (new file): * macosx/Tcl.xcodeproj/default.pbxuser (new file): * macosx/Tcl.xcodeproj/project.pbxproj (new file): new/updated projects for Xcode 2.2 on 10.4, Xcode 1.5 on 10.3 & ProjectBuilder on 10.2, with native tcltest targets and support for universal (fat) compiles. * macosx/README: clarification/cleanup, document new Xcode projects and universal (fat) builds via CFLAGS (i.e. all of ppc ppc64 i386 at once). * unix/Makefile.in: * unix/aclocal.m4: * unix/configure.in: * unix/dltest/Makefile.in: * macosx/configure.ac (new file): add support for inclusion of unix/configure.in by macosx/configure.ac, allows generation of a config headers enabled configure script in macosx (required by Xcode projects). * macosx/GNUmakefile: rename from Makefile to avoid overwriting by configure run in tcl/macosx, add support for reusing configure cache, build target fixes, remove GENERIC_FLAGS override now handled by tcl.m4. * generic/tcl.decls: add Tcl_Main declaration as comment to avoid 'checkstubs' target complaining about it missing from stubs. * generic/regex.h: * generic/tclDate.c: * generic/tclEnv.c: * generic/tclGetDate.y: * generic/tclIOUtil.c: * generic/tclObj.c: * generic/tclStubInit.c: * generic/tclStubLib.c: * generic/tclPathObj.c: * generic/tclThreadAlloc.c: * generic/tclThreadStorage.c: * generic/tclTrace.c: * generic/tclVar.c: * generic/tommath.h: * tools/fix_tommath_h.tcl: * unix/tclUnixFCmd.c: ensure externally visible symbols not contained in stubs table are declared as MODULE_SCOPE (or as static if not used outside of own source file). These changes allow 'make checkstubs' to complete without error on Darwin with gcc 4. * generic/rege_dfa.c (getvacant): * generic/regexec.c (cfind): * generic/tclCompExpr.c (CompileSubExpr): * generic/tclNamesp.c (NamespaceEnsembleCmd): * unix/tclUnixChan.c (TclUnixWaitForFile): initialise variables to silence gcc 4 warnings. * generic/tclExecute.c (TclExecuteByteCode): fix unused variable warning when NO_WIDE_TYPE is defined. * generic/regguts.h: only #define NDEBUG if not already #defined. * unix/tclUnixNotfy.c: * macosx/tclMacOSXNotify.c: sync whitespace & comments. * unix/tclUnixPort.h: * win/tclWinPort.h: remove declaration of obsolete&unused TclpMutex API. * unix/configure: * unix/tclConfig.h.in: regen.
* Tidy updkf2005-11-071-41/+47
|
* * generic/tclBinary.c:Miguel Sofer2005-11-041-18/+24
| | | | | | | | | | | | | | | | * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclDictObj.c: * generic/tclExecute.c: * generic/tclIOCmd.c: * generic/tclLink.c: * generic/tclTest.c: * generic/tclVar.c: fix for [Bug 1334947]. The functions TclPtrSetVar, Tcl_ObjSetVar2 and Tcl_SetVar2Ex now always consume the newValuePtr argument - i.e., they will free a 0-refCount object if they failed to set the variable. Fixed all callers in the core.
* * generic/tclInt.h:Miguel Sofer2005-11-041-70/+191
| | | | | | | | * generic/tclNamesp.c: * generic/tclVar.c: * tests/trace.test: fix for [Bugs 1338280/1337229]; changed to use the same approach as the 8.4 patch in the ticket (i.e., removed the patch committed on 2005-31-10).
* ANSIfy (though only partially - function decls only - for tclExecute.c)dkf2005-11-021-190/+194
|
* Partial ANSIfydkf2005-11-021-213/+209
|
* * 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]