summaryrefslogtreecommitdiffstats
path: root/generic/tclDictObj.c
Commit message (Collapse)AuthorAgeFilesLines
* some formatting (*.decls)jan.nijtmans2012-04-041-1/+1
| | | | | move up #undef, for macro which is conflicting with later stuff. remove some unused cygwin-related code some minor gcc warnings
* * generic/tclDictObj.c (DictExistsCmd): [Bug 3475264]: Ensure thatdkf2012-01-221-11/+5
| | | | | errors only ever happen when insufficient arguments are supplied, and not when a path doesn't exist or a dictionary is poorly formatted (the two cases can't be easily distinguished).
* Completed patch with mucho comments. Merge 8.5.bug_3173086dgp2011-05-101-123/+69
|
* Significant rewrite of the Tcl*(Scan|Convert)*Element() system, and revisionsdgp2011-03-031-21/+37
| | | | to the callers. Needs more work on comments, and testing to check for any performance impact in either direction. Fixes reported bug.
* 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.
* Backport of fix for [Bug 3004007], EIAS violation in list-dict conversions.ferrieux2010-05-191-1/+9
|
* [Bug 2874678]: Don't leak bignums in [dict incr]...dkf2009-10-081-1/+7
|
* Corrected twiddling in internals of dictionaries so that literals can't getdkf2009-01-061-2/+3
| | | | destroyed.
* Fix [Bug 2008248] and make dict->list->dict round trip efficient to boot.dkf2008-07-201-10/+1
|
* merge stable branch onto HEADdgp2007-12-131-1/+1
|
* Rebuild [dict] as a full compiled ensemble.dkf2007-11-221-191/+187
|
* Rewrote the [string] and [dict] implementations to be ready for conversiondkf2007-11-221-63/+73
| | | | to ensembles.
* * generic/tclDictObj.c: Changed the underlying implementation of thedkf2007-11-201-162/+315
| | | | | | | | | hash table used in dictionaries to additionally keep all entries in the hash table in a linked list, which is only ever added to at the end. This makes iteration over all entries in the dictionary in key insertion order a trivial operation, and so cleans up a great deal of complexity relating to dictionary representation and stability of iteration order.
* improvements to commentsdkf2007-11-191-5/+13
|
* [Patch 1830038]: Increased usage of macros to detect and take advantage of ↵Miguel Sofer2007-11-111-11/+11
| | | | objTypes.
* Fix [Bug 1786481]dkf2007-09-081-1/+16
|
* Fix [Bug 1705778, leak K05]dkf2007-04-241-1/+7
|
* Fix [Bug 1705778, leak K04]dkf2007-04-241-17/+33
|
* Handle creation of Tcl_Objs from constant strings better (easier to use, moredkf2007-04-101-9/+9
| | | | efficient). After [Patch 1529526] (afredd)
* * generic/tclBasic.c: TIP #280 implementation.andreas_kupries2006-11-281-7/+13
| | | | | | | | | | | | | | | | | | | | | * 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:
* TIP#270 IMPLEMENTATIONdgp2006-11-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tcl.decls: New public routines Tcl_ObjPrintf, * generic/tclStringObj.c: Tcl_AppendObjToErrorInfo, Tcl_Format, * generic/tclInt.h: Tcl_AppendLimitedToObj, Tcl_AppendFormatToObj and Tcl_AppendPrintfToObj. Former internal versions removed. * generic/tclDecls.h: make genstubs * generic/tclStubInit.c: * generic/tclBasic.c: Updated callers. * generic/tclCkalloc.c: * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclCompExpr.c: * generic/tclCompile.c: * generic/tclDictObj.c: * generic/tclExecute.c: * generic/tclIORChan.c: * generic/tclIOUtil.c: * generic/tclMain.c: * generic/tclNamesp.c: * generic/tclObj.c: * generic/tclPkg.c: * generic/tclProc.c: * generic/tclStrToD.c: * generic/tclTimer.c: * generic/tclUtil.c: * unix/tclUnixFCmd.c:
* Minor simplification of memcpy usagedkf2006-11-081-2/+2
|
* * generic/tclBasic.c: Further revised TclAppendPrintToObj() anddgp2006-11-021-3/+3
| | | | | | | | | | | | | | | | | | | | | * generic/tclCkalloc.c: TclObjPrintf() routines to panic when unable * generic/tclCmdAH.c: to complete their formatting operations, rather * generic/tclCmdIL.c: than report an error message. This means an * generic/tclCmdMZ.c: interp argument for error message recording is * generic/tclDictObj.c: no longer needed, further simplifying the * generic/tclExecute.c: interface for callers. * generic/tclIORChan.c: * generic/tclIOUtil.c: * generic/tclInt.h: * generic/tclMain.c: * generic/tclNamesp.c: * generic/tclParseExpr.c: * generic/tclPkg.c: * generic/tclProc.c: * generic/tclStringObj.c: * generic/tclTimer.c: * generic/tclUtil.c: * unix/tclUnixFCmd.c:
* * generic/tclBasic.c: Refactored and renamed the routinesdgp2006-10-311-5/+5
| | | | | | | | | | | | | | | | | | | | | * generic/tclCkalloc.c: TclObjPrintf, TclFormatObj, and * generic/tclCmdAH.c: TclFormatToErrorInfo to a new set of * generic/tclCmdIL.c: routines TclAppendPrintfToObj, * generic/tclCmdMZ.c: TclAppendFormatToObj, TclObjPrintf, and * generic/tclDictObj.c: TclObjFormat, with the intent of making * generic/tclExecute.c: the latter list, plus TclAppendLimitedToObj * generic/tclIORChan.c: and TclAppendObjToErrorInfo, public via * generic/tclIOUtil.c: a revised TIP 270. * generic/tclInt.h: * generic/tclMain.c: * generic/tclNamesp.c: * generic/tclParseExpr.c: * generic/tclPkg.c: * generic/tclProc.c: * generic/tclStringObj.c: * generic/tclTimer.c: * generic/tclUtil.c: * unix/tclUnixFCmd.c:
* Various minor object file size efficiency fixes. [Bug 1530474]dkf2006-08-101-8/+8
|
* Fix silly error in error handling for uncompiled [dict for]. [Bug 1531184]dkf2006-08-091-11/+11
|
* * generic/tclBinary.c:Miguel Sofer2005-11-041-22/+6
| | | | | | | | | | | | | | | | * 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.
* ANSIfy. Also converted some deeply nested code to a less nested form for ↵dkf2005-11-011-497/+552
| | | | easier reading.
* * generic/tclClock.c: Removed some dead code.dgp2005-10-191-168/+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-2/+70
| | | | | | [kennykb-numerics-branch] Resynchronized with the HEAD; at this checkpoint [-rkennykb-numerics-branch-20051008], the HEAD and kennykb-numerics-branch contain identical code.
* silence compiler warningdgp2005-09-161-2/+1
|
* * generic/tclStringObj.c: Bug fixes: ObjPrintfVA needed todgp2005-09-141-8/+5
| | | | | | | | | | | | | | | | | | support "*" fields and needed to interpret precision limits on %s conversions as a maximum number of bytes, not Tcl_UniChars, to take from the (char *) argument. * generic/tclBasic.c: Updated several callers to use * generic/tclCkalloc.c: TclFormatToErrorInfo() and/or * generic/tclCmdAH.c: TclObjPrintf(). * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclDictObj.c: * generic/tclExecute.c: * generic/tclIORChan.c: * generic/tclIOUtil.c: * generic/tclNamesp.c: * generic/tclProc.c:
* Compiler for [dict] and related changes.dkf2005-07-211-42/+13
|
* Purge remnants of old dictionary rep interlocking code; it only ever workeddkf2005-07-041-44/+25
| | | | when the locking was in the core of the iterator itself.
* 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-5/+21
| | | | | | | | | | | | | | * 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:
* The 2005-04-21 changes to Tcl_GetBooleanFromObj were done to bringdgp2005-04-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | it into agreement with its docs. Further investigation reveals it was the docs that were incorrect. * doc/BoolObj.3: Corrections to the documentation of Tcl_GetBooleanFromObj to bring it into agreement with what this public interface has always done, including noting the difference in function between Tcl_GetBooleanFromObj and Tcl_GetBoolean. * generic/tclGet.c: Revised Tcl_GetBoolean to no longer be a wrapper around Tcl_GetBooleanFromObj (different function!). * generic/tclObj.c: Removed TclGetTruthValueFromObj routine that was added yesterday. Revisions so that only Tcl_GetBoolean-approved values get the "boolean" Tcl_ObjType. This retains the fix for [Bug 1187123]. * generic/tclInt.h: Revert most recent change. * generic/tclBasic.c: * generic/tclCompCmds.c: * generic/tclDictObj.c: * generic/tclExecute.c: * tests/obj.test:
* * generic/tclDictObj.c: Updated callers to call new routine.dgp2005-04-211-2/+2
|
* TIP #221 IMPLEMENTATIONdgp2004-11-131-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclBasic.c: Define [::tcl::Bgerror] in new interps. * generic/tclEvent.c: Update Tcl_BackgroundError to make use of the registered [interp bgerror] command. * generic/tclInterp.c: New [interp bgerror] subcommand. * tests/interp.test: syntax tests updated. TIP #226 IMPLEMENTATION * generic/tcl.decls: Stubs for Tcl_(Save|Restore|Discard)InterpState * generic/tcl.h: New public opaque type, Tcl_InterpState. * generic/tclInt.h: Drop old private declarations. Add Tcl(Get|Set)BgErrorHandler * generic/tclResult.c: Tcl_*InterpState implementations. * generic/tclDictObj.c: Update callers. * generic/tclIOGT.c: * generic/tclTrace.c: TIP #227 IMPLEMENTATION * generic/tcl.decls: Stubs for Tcl_(Get|Set)ReturnOptions. * generic/tclInt.h: Drop old private declarations. * generic/tclResult.c: Tcl_*ReturnOptions implementations. * generic/tclCmdAH.c: Update callers. * generic/tclMain.c:
* Stop losing result codes in [dict with] in some circumstancesdkf2004-10-191-3/+2
|
* * generic/tclInt.h (Tcl*InterpState): New internal routinesdgp2004-10-191-15/+13
| | | | | | | | | | | | | | | | | | | | | * generic/tclResult.c (Tcl*InterpState): TclSaveInterpState, TclRestoreInterpState, and TclDiscardInterpState are superior replacements for Tcl_(Save|Restore|Discard)Result. Intent is that these routines will be converted to public routines after TIP approval. * generic/tclBasic.c (TclEvalObjvInternal): * generic/tclDictObj.c (DictUpdateCmd, DictWithCmd): * generic/tclIOGT.c (ExecuteCallback): * generic/tclTrace.c (Trace*Proc,TclCheck*Traces,TclCallVarTraces): Callers of Tcl_*Result updated to call the new routines. The calls were relocated in several cases to perform save/restore operations only when needed. * generic/tclEvent.c (HandleBgErrors): * generic/tclFCmd.c (CopyRenameOneFile): Calls to Tcl_*Result that were eliminated because they appeared to serve no useful purpose, typically saving/restoring an error message, only to throw it away.
* Fix comments...dkf2004-10-111-3/+3
|
* Fix things so we can pass our own test suite for TIP#212...dkf2004-10-081-3/+3
|
* Core of implementation of TIP#212dkf2004-10-081-60/+379
|
* * generic/tclBasic.c:dgp2004-10-061-18/+11
| | | | | | | | | | | | | | | * generic/tclBinary.c: * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclCompExpr.c: * generic/tclDictObj.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.
* Remove unneeded labeldkf2004-10-021-2/+1
|
* Modify the semantics of [dict set] to be what everyone expected them to bedkf2004-10-021-72/+136
| | | | | in a straw poll. Also made T_DODone;T_DONext a non-fatal sequence, leading to simplified code.
* Factorize out the code for freeing an object's internal rep.dkf2004-09-291-7/+3
|
* Stop [dict unset] from leaking objects. [Bug 989093 in part]dkf2004-07-111-2/+4
|
* Made compiling with -Wstrict-prototypes -Wmissing-prototypes much cleaner.dkf2004-05-271-1/+2
| | | | Also added support for [FRQ 951168] but left that switched off by default.