summaryrefslogtreecommitdiffstats
path: root/generic/tclVar.c
Commit message (Collapse)AuthorAgeFilesLines
* Adjust ckalloc/ckfree macros to greatly reduce number of explicit casts indkf2011-03-121-16/+14
| | | rest of Tcl source code. No ABI change. API change *should* be harmless.
* Now that we're no longer using SCM based on RCS, the RCS Keyword linesdgp2011-03-021-2/+0
|\ | | | | cause more harm than good. Purged them (except in zlib files).
| * Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-021-2/+0
| |\ | | | | | | more harm than good. Purged them.
| | * Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-011-2/+0
| | | | | | | | | more harm than good. Purged them.
| | * * generic/tclExecute.c: [Bug 3057639]. Applied patch by Jeff toandreas_kupries2010-09-011-3/+5
| | | | | | | | | | | | | | | | | | | | | * generic/tclVar.c: make the behaviour of lappend in bytecompiled * tests/append.test: mode consistent with direct-eval and 'append' * tests/appendComp.test: generally. Added tests (append*-9.*) showing the difference.
| | * * generic/tclBasic.c (Tcl_CreateInterp, Tcl_EvalTokensStandard,andreas_kupries2009-08-251-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EvalTokensStandard, Tcl_EvalEx, EvalEx, TclAdvanceContinuations, TclEvalObjEx): * generic/tclCmdMZ.c (Tcl_SwitchObjCmd, ListLines): * generic/tclCompCmds.c (*): * generic/tclCompile.c (TclSetByteCodeFromAny, TclInitCompileEnv, TclFreeCompileEnv, TclCompileScript): * generic/tclCompile.h (CompileEnv): * generic/tclInt.h (ContLineLoc, Interp): * generic/tclObj.c (ThreadSpecificData, ContLineLocFree, TclThreadFinalizeObjects, TclInitObjSubsystem, TclContinuationsEnter, TclContinuationsEnterDerived, TclContinuationsCopy, TclContinuationsGet, TclFreeObj): * generic/tclProc.c (TclCreateProc): * generic/tclVar.c (TclPtrSetVar): * tests/info.test (info-30.0-22): Extended parser, compiler, and execution with code and attendant data structures tracking the positions of continuation lines which are not visible in script's, to properly account for them while counting lines for #280, during direct and compiled execution.
| | * [Tcl Bug 1706140]dgp2007-05-101-45/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
| | * * generic/tclVar.c (TclArraySet): Re-fetch pointers for the listdgp2007-03-131-1/+9
| | | | | | | | | | | | | | | | | | * tests/var.test (var-17.1): argument of [array set] each time through the loop as defense against possible shimmer issues. [Bug 1669489].
| | * * generic/tclVar.c (Tcl_LappendObjCmd):Miguel Sofer2006-10-051-2/+9
| | | | | | | | | | | | | | | * tests/append.test(4.21-22): fix for longstanding [Bug 1570718], lappending nothing to non-list. Reported by lvirden
| | * * unix/tcl.m4 (Darwin): add 64bit support, check for Tiger copyfile(),das2005-11-271-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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, sync whitespace with HEAD. * 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 * 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/tclUnixPort.h: * unix/tclUnixFCmd.c: 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: sync with HEAD. * macosx/README: clarification/cleanup, sync with HEAD, document universal (fat) builds via CFLAGS (i.e. all of ppc ppc64 i386 at once). * macosx/Makefile: add support for reusing configure cache, build target fixes, remove GENERIC_FLAGS override now handled by tcl.m4. * generic/tclIOUtil.c: * generic/tclRegexp.c: * generic/tclVar.c: declare globals used only in own file as static (sync with HEAD). * generic/rege_dfa.c (getvacant): * generic/regexec.c (cfind): * generic/tclCompExpr.c (CompileSubExpr): * unix/tclUnixChan.c (TclUnixWaitForFile): initialise variables to silence gcc 4 warnings. * generic/regguts.h: only #define NDEBUG if not already #defined. * macosx/tclMacOSXNotify.c: sync whitespace & comments with HEAD * unix/configure: regen.
| | * * generic/tclInt.h:Miguel Sofer2005-11-041-47/+172
| | | | | | | | | | | | | | | | | | | | | * generic/tclNamesp.c: * generic/tclVar.c: fix for [Bugs 1338280/1337229]. Thanks Don. * tests/trace.test: fix duplicate test numbers
| | * * generic/tclBasic.c:Miguel Sofer2005-10-231-13/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
| | * Correction to 1038021 bug fix; should only save restore those bitsdgp2004-10-011-3/+4
| | | | | | | | | | | | | | | that get cleared by Tcl_ResetResult() and not more serious things like DELETED.
| | * * generic/tclNamespace.c (TclTeardownNamespace): Tcl_Obj-ifieddgp2004-09-301-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/namespace.test (namespace-8.5,6): the save/restore of ::errorInfo and ::errorCode during global namespace teardown. Revised the comment to clarify why this is done, and added tests that will fail if this is not done. * generic/tclResult.c (TclTransferResult): Added safety checks so that unexpected undefined ::errorInfo or ::errorCode will not lead to a segfault. * generic/tclVar.c (CallVarTraces): Save/restore the flag * tests/var.test (var-16.1): values that define part of the interpreter state during variable traces. [Bug 10381021].
| | * fix for [Bug 1008314]Miguel Sofer2004-08-161-3/+6
| | |
| | * * generic/tclVar.c (TclObjUnsetVar2): backported fix [Bug 735335]Miguel Sofer2004-05-221-9/+26
| | | | | | | | | | | | | | | | | | | | | | | | and new (in tcl8.4) exteriorisations of [Bug 736729] due to the use of tclNsVarNameType obj types. The consequences of [Bug 736729] should be the same as in tcl8.3 and previous versions. The use of tclNsVarNameType objs is still disabled, pending a decision by the release manager.
| | * * generic/tclVar.c: fix flag bit collision betweenMiguel Sofer2003-11-201-2/+2
| | | | | | | | | | | | LOOKUP_FOR_UPVAR and TCL_PARSE_PART1 (deprecated) [Bug 835020]
| | * * 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]
| | * * 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 (VarHashInvalidateEntry): Removed obsoleteandreas_kupries2010-11-231-12/+1
| | | | | | | | | | | | | | | | | | patch for AIX defining this macro as function. This is not necessary anymore. See ChangeLog entry 2010-07-28 (Bug 3037525) for the actual bug and fix the patch was a workaround for.
| * | * generic/tclExecute.c: [Bug 3057639]. Applied patch by Jeff toandreas_kupries2010-09-011-3/+5
| | | | | | | | | | | | | | | | | | | | | * generic/tclVar.c: make the behaviour of lappend in bytecompiled * tests/append.test: mode consistent with direct-eval and 'append' * tests/appendComp.test: generally. Added tests (append*-9.*) showing the difference.
| * | * generic/tclVar.c: fix for crash [Bug 3037525]: lose fickleMiguel Sofer2010-07-311-7/+3
| | | | | | | | | | | | optimisation in TclDeleteVars (used for runtime-created locals)
| * | More corrections to the [array unset] command.dkf2010-02-031-7/+6
| | |
| * | Ensure that decrements never assume that they can't do (actual) deletion.dkf2010-02-021-3/+7
| | |
| * | Fix [Bug 2939073]: dangling ref when an unset trace triggered by [array unset]dkf2010-02-021-20/+59
| | | | | | | | | | | | hits the next element to be deleted.
| * | Fix [Bug 2629338]: Stop evil unset traces from accessing freed memory.dkf2009-10-171-5/+25
| | |
| * | * generic/tclBasic.c (Tcl_CreateInterp, Tcl_EvalTokensStandard,andreas_kupries2009-08-251-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EvalTokensStandard, Tcl_EvalEx, EvalEx, TclAdvanceContinuations, TclEvalObjEx): * generic/tclCmdMZ.c (Tcl_SwitchObjCmd, TclListLines): * generic/tclCompCmds.c (*): * generic/tclCompile.c (TclSetByteCodeFromAny, TclInitCompileEnv, TclFreeCompileEnv, TclCompileScript): * generic/tclCompile.h (CompileEnv): * generic/tclInt.h (ContLineLoc, Interp): * generic/tclObj.c (ThreadSpecificData, ContLineLocFree, TclThreadFinalizeObjects, TclInitObjSubsystem, TclContinuationsEnter, TclContinuationsEnterDerived, TclContinuationsCopy, TclContinuationsGet, TclFreeObj): * generic/tclParse.c (TclSubstTokens, Tcl_SubstObj): * generic/tclProc.c (TclCreateProc): * generic/tclVar.c (TclPtrSetVar): * tests/info.test (info-30.0-24): Extended parser, compiler, and execution with code and attendant data structures tracking the positions of continuation lines which are not visible in script Tcl_Obj*'s, to properly account for them while counting lines for #280.
| * | * generic/tclCmdIL.c: Removed unused variables.dgp2009-07-161-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCompile.c: * generic/tclVar.c: * unix/tclUnixChan.c: * generic/tclScan.c: Typo in ACCEPT_NAN configuration. * generic/tclStrToD.c: Set floating point control register on MIPS systems so that the gradual underflow expected by Tcl is in effect. [Bug 2819200]
| * | * generic/tclTrace.c: Corrected handling of errors returned bydgp2008-10-081-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | variable traces so that the errorInfo value contains the original error message. [Bug 2151707] * generic/tclVar.c: Revised implementation of TclObjVarErrMsg so that error message construction does not disturb an existing iPtr->errorInfo that may be in progress.
| * | * generic/tclVar.c (TclLookupSimpleVar): Retrieve the number ofdgp2008-08-071-3/+2
| | | | | | | | | | | | | | | | | | locals in the localCache from the CallFrame and not from the Proc which may have been mangled by a (broken?) recompile. Backport from the HEAD.
| * | * generic/tclBasic.c: Extended the existing TIP #280 system (infoandreas_kupries2008-07-211-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclCmdAH.c: frame), added the ability to track the * generic/tclCompCmds.c: absolute location of literal procedure * generic/tclCompile.c: arguments, and making this information * generic/tclCompile.h: available to uplevel, eval, and * generic/tclInterp.c: siblings. This allows proper tracking of * generic/tclInt.h: absolute location through custom (Tcl-coded) * generic/tclNamesp.c: control structures based on uplevel, etc. * generic/tclProc.c:
* | | Fix gcc -Wextra warning: missing initializernijtmans2010-12-101-13/+13
| | |
* | | * generic/tclVar.c: use the macro HasLocalVars everywhereMiguel Sofer2010-09-271-4/+3
| | |
* | | * generic/tclOOMethod.c (ProcedureMethodCompiledVarConnect):hobbs2010-09-221-20/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclVar.c (TclLookupSimpleVar, CompareVarKeys): * generic/tclPathObj.c (Tcl_FSGetNormalizedPath, Tcl_FSEqualPaths): * generic/tclExecute.c (TclExecuteByteCode): * generic/tclIOUtil.c (TclFSCwdPointerEquals): peephole opt * generic/tclResult.c (TclMergeReturnOptions): use memcmp where applicable as possible speedup on some libc variants.
* | | * generic/tclExecute.c: [Bug 3057639]. Applied patch by Jeff toandreas_kupries2010-09-011-3/+5
| | | | | | | | | | | | | | | | | | | | | * generic/tclVar.c: make the behaviour of lappend in bytecompiled * tests/append.test: mode consistent with direct-eval and 'append' * tests/appendComp.test: generally. Added tests (append*-9.*) showing the difference.
* | | Remove many type casts which are no longernecessary as a result of [Patch ↵nijtmans2010-08-221-13/+11
| | | | | | | | | | | | 3009403]: Signature of Tcl_GetHashKey, Tcl_(Create|Find)HashEntry
* | | * generic/tclVar.c: correcting bad port of [Bug 3037525] fixMiguel Sofer2010-08-021-2/+2
| | |
* | | * generic/tclVar.c: fix for crash [Bug 3037525]: lose fickleMiguel Sofer2010-07-311-7/+2
| | | | | | | | | | | | optimisation in TclDeleteVars (used for runtime-created locals)
* | | Eliminate some casts to (Tcl_HashTable *)nijtmans2010-05-311-4/+4
| | |
* | | Code Audit results:dkf2010-03-051-11/+8
| | | | | | | | | | | | | | | | | | | | | | | | * use do { ... } while (0) in macros * avoid shadowing one local variable with another * use clearer 'foo.bar++;' instead of '++foo.bar;' where result not required (i.e., semantically equivalent) * follow Engineering Manual rules on spacing and declarations
* | | Pure whitespace changes, changing to follow Engineering Manual style.dkf2010-02-241-2/+2
| | |
* | | Upgrade Tcl's hash function to use the FNV-32 algorithm. This is marginallydkf2010-02-071-36/+2
| | | | | | | | | | | | | | | faster and gives a bit better distribution of keys (especially in large hash tables) but does change hash iteration order.
* | | More consistency in errorcode generation.dkf2010-02-051-14/+25
| | |
* | | Follow-up to [2010-01-29] commit:nijtmans2010-02-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | prevent space within stub table function parameters if the parameter type is a pointer. Minor formatting, and VOID -> void. Change signature of TclNRInterpProcCore, and TclOONewProc(Instance|)MethodEx, indicating that errorProc is a function pointer tclVar.c: fixed two gcc warnings
* | | Use the object RE interface for faster matching in [array names -regexp].dkf2010-02-041-121/+136
| | |
* | | Make [array get] work again with a trivial pattern.dkf2010-02-041-4/+4
| | |
* | | Minor updates: more errorcodes, less C stack levels for old APIsdkf2010-02-041-98/+191
| | |
* | | More corrections to the [array unset] command.dkf2010-02-031-26/+30
| | |
* | | Turned the [array] command into a true ensemble. Test changes indicate somedkf2010-02-021-551/+1177
| | | | | | | | | | | | alteration to error messages, otherwise no change.