summaryrefslogtreecommitdiffstats
path: root/generic/tclObj.c
Commit message (Collapse)AuthorAgeFilesLines
* * doc/Object.3 CONSTified 3 functions usingnijtmans2008-07-271-25/+25
| | | | | | | | | | | | | | | * doc/ObjectType.3 Tcl_ObjType which all are supposed * generic/tcl.decls to be a constant, but this was not * generic/tcl.h reflected in the API: * generic/tclDecls.h Tcl_ConvertToType * generic/tclObj.c Tcl_GetObjType * generic/tclCompCmds.c Tcl_RegisterObjType * generic/tclOOMethod.c Introduced a CONST86_RETURN, so extensions which * generic/tclTestobj.c use Tcl_ObjType directly can be modified to compile against both Tcl 8.5 and Tcl 8.6 tclDecls.h is re-generated with "make genstubs" This change complies with TIP #24 ***POTENTIAL INCOMPATIBILITY***
* Get rid of pre-C89-isms (esp. CONST vs const).dkf2008-04-271-40/+41
|
* * generic/tclObj.c: Added missing #include <math.h> needed toKevin B Kenny2008-03-301-1/+2
| | | | locate isnan() after the above change.
* merge stable branch onto HEADdgp2007-12-131-1/+1
|
* * generic/tclDictObj.c: Changed the underlying implementation of thedkf2007-11-201-20/+17
| | | | | | | | | 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.
* [Patch 1830038]: Increased usage of macros to detect and take advantage of ↵Miguel Sofer2007-11-111-5/+9
| | | | objTypes.
* * generic/tclObj.c: remove superfluous #include of tclCompile.hMiguel Sofer2007-10-111-2/+1
|
* * generic/tclDTrace.d (new file): add DTrace provider for Tcl; allowsdas2007-09-131-7/+9
| | | | | | | | | | | | | | | | | | * generic/tclCompile.h: tracing of proc and command entry & * generic/tclBasic.c: return, bytecode execution, object * generic/tclExecute.c: allocation and more; with essentially * generic/tclInt.h: zero cost when tracing is inactive; * generic/tclObj.c: enable with --enable-dtrace configure * generic/tclProc.c: arg (disabled by default, will only * unix/Makefile.in: enable if DTrace is present). * unix/configure.in: [Patch 1793984] * macosx/GNUmakefile: enable DTrace support. * macosx/Tcl-Common.xcconfig: * macosx/Tcl.xcodeproj/project.pbxproj: * unix/configure: autoconf-2.59 * unix/tclConfig.h.in: autoheader-2.59
* * generic/tclInt.h: Removed the "nsName" Tcl_ObjType from thedgp2007-09-091-2/+1
| | | | | | | | | | | | | | | | | | | * generic/tclNamesp.c: registered set. Revised the management of * generic/tclObj.c: the intrep of that Tcl_ObjType. Revised the * tests/obj.test: TclGetNamespaceFromObj() routine to return TCL_ERROR and write a consistent error message when a namespace is not found. [Bug 1588842. Patch 1686862] ***POTENTIAL INCOMPATIBILITY*** For callers of Tcl_GetObjType() on the name "nsName". * generic/tclExecute.c: Update TclGetNamespaceFromObj() callers. * generic/tclProc.c: * tests/apply.test: Updated tests to expect new consistent * tests/namespace-old.test: error message when a namespace is not * tests/namespace.test: found. * tests/upvar.test:
* * generic/tclObj.c (TclInitObjSubsystem): restore registration of thedas2007-09-031-2/+35
| | | | | "wideInt" Tcl_ObjType for compatibility with 8.4 extensions that access the tclWideIntType Tcl_ObjType; add setFromAnyProc for tclWideIntType.
* * generic/tcl_Obj.c (TclAllocateFreeObjects): remove unneededMiguel Sofer2007-08-121-2/+1
| | | | memset to 0 of all allocated objects.
* VarReform [Patch 1750051]Miguel Sofer2007-07-311-2/+3
| | | | *** POTENTIAL INCOMPATIBILITY *** (tclInt.h and tclCompile.h)
* clarify comments for last commitMiguel Sofer2007-07-051-2/+2
|
* * generic/tclNamesp.c (SetNsNameFromAny):Miguel Sofer2007-07-051-21/+32
| | | | | * generic/tclObj.c (SetCmdNameFromAny): Avoid unnecessary ckfree/ckalloc when the old structs can be reused.
* * generic/tclNamesp.c: Fix case where a FQ cmd or ns was beingMiguel Sofer2007-07-041-1/+2
| | | | | * generic/tclObj.c: cached in a different interp, tkcon [Bug 1747512]
* * generic/tclNamesp.c: tweaks to Tcl_GetCommandFromObj andMiguel Sofer2007-06-111-77/+54
| | | | | | * generic/tclObj.c: TclGetNamespaceFromObj; modified the usage of structs ResolvedCmdName and ResolvedNsname so that the field refNsPtr is NULL for fully qualified names.
* * generic/tclNamesp.c: tweaks to Tcl_GetCommandFromObj andMiguel Sofer2007-06-111-8/+9
| | | | * generic/tclObj.c: TclGetNamespaceFromObj
* * generic/tclInt.h:Miguel Sofer2007-06-101-21/+20
| | | | | | | | | * generic/tclNamesp.c: * generic/tclObj.c: * generic/tclvar.c: new macros TclGetCurrentNamespace() and TclGetGlobalNamespace(); Tcl_GetCommandFromObj and TclGetNamespaceFromObj rewritten to make the logic clearer; slightly faster too.
* * generic/tclObj.c (Tcl_GetCommandFromObj): rewritten to make theMiguel Sofer2007-06-091-41/+32
| | | | logic clearer; slightly faster too.
* * generic/tclBasic.c: Split TEOv in two, by separating aMiguel Sofer2007-06-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | processor for non-TCL_OK returns. Also spli TEOvI in a full version that handles non-existing and traced commands, and a separate shorter version for the regular case. * generic/tclBasic.c: Moved the generation of command strings for * generic/tclTrace.c: traces: previously in Tcl_EvalObjv(), now in TclCheck[Interp|Execution]Traces(). Also insured that the strings are properly nul terminated at the correct length [Bug 1693986] * generic/tclBasic.c: Extend usage of TclLimitReady() and * generic/tclExecute.c: (new) TclLimitExceeded() macros. * generic/tclInt.h: * generic/tclInterp.c: * generic/tclInt.h: New TclCleanupCommandMacro for core usage. * generic/tclBasic.c: * generic/tclExecute.c: * generic/tclObj.c:
* Add a full stop to a commentdkf2007-05-111-2/+2
|
* Replaced commas in varargs with string concatenation where possible [Patch ↵Kevin B Kenny2007-04-201-4/+4
| | | | 1515234]
* Reformat to standard function definition form; don't use C++ keywordsdkf2007-04-101-7/+9
|
* Handle creation of Tcl_Objs from constant strings better (easier to use, moredkf2007-04-101-9/+11
| | | | efficient). After [Patch 1529526] (afredd)
* * generic/tclBasic.c (Tcl_CreateMathFunc): Replaced somedgp2007-03-191-2/+2
| | | | | | | * generic/tclEvent.c (Tcl_CreateThread): calls to Tcl_Alloc() * generic/tclObj.c (UpdateStringOfBignum): with calls to * unix/tclUnixTime.c (SetTZIfNecessary): ckalloc(), which better * win/tclAppInit.c (setargv): supports memory debugging.
* * generic/tclObj.c (Tcl_AppendAllObjTypes): Converted to simplerdgp2007-03-071-4/+3
| | | | list validity test.
* TIP#298 IMPLEMENTATIONdgp2006-12-011-13/+4
| | | | | | | | | | | * generic/tcl.decls: Tcl_GetBignumAndClearObj -> Tcl_TakeBignumFromObj. * generic/tclObj.c: * generic/tclDecls.h: make genstubs * generic/tclStubInit.c: * generic/tclExecute.c: Update callers. * generic/tclMathOp.c:
* TIP#270 IMPLEMENTATIONdgp2006-11-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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:
* * generic/tcl.h: Modified the Tcl call stack soMiguel Sofer2006-10-231-18/+6
| | | | | | | | | | | | | * generic/tclBasic.c: there is always a valid CallFrame, even * generic/tclCmdIL.c: at level 0 [Patch 1577278]. Most of the * generic/tclInt.h: changes involve removing tests for * generic/tclNamesp.c: iPtr->(var)framePtr==NULL. There is now a * generic/tclObj.c: CallFrame pushed at interp creation * generic/tclProc.c: with a pointer to it stored in * generic/tclTrace.c: iPtr->rootFramePtr. A second unused * generic/tclVar.c: field in Interp is hijacked to enable further functionality, currently unused (but with several FRQs depending on it).
* * generic/tclInt.decls:Miguel Sofer2006-09-301-15/+42
| | | | | | | | | * generic/tclInt.h: * generic/tclIntDecls.h: * generic/tclObj.c: * generic/tclStubInit.c: added an internal function TclObjBeingDeleted to provide info as to the reason for the loss of an internal rep. [FR 1512138]
* Various minor object file size efficiency fixes. [Bug 1530474]dkf2006-08-101-10/+10
|
* undo mistaken commitdgp2006-07-211-10/+12
|
* * generic/tclExecute.c:Miguel Sofer2006-07-211-12/+10
| | | | * tests/execute.test (execute-9.1): dgp's fix for [Bug 1522803].
* * generic/regc_locale.c (cclass):das2006-07-201-8/+8
| | | | | | | | | | | | | * generic/tclExecute.c (TclExecuteByteCode): * generic/tclIOCmd.c (Tcl_ExecObjCmd): * generic/tclListObj.c (NewListIntRep): * generic/tclObj.c (Tcl_GetLongFromObj, Tcl_GetWideIntFromObj, FreeBignum, Tcl_SetBignumObj): * generic/tclParseExpr.c (Tcl_ParseExpr): * generic/tclStrToD.c (TclParseNumber): * generic/tclStringObj.c (TclAppendFormattedObjs): * unix/tclUnixPipe.c (TclpCreateProcess): fix signed-with-unsigned comparison and other warnings from gcc4 -Wextra.
* * generic/tclIOUtil.c: Changed default configuration todgp2006-06-211-25/+5
| | | | | | | | | | | | | | | | | | | | * generic/tclInt.decls: #undef USE_OBSOLETE_FS_HOOKS which disables * generic/tclTest.c: access to the Tcl 8.3 internal routines for hooking into filesystem operations. Everyone ought to have migrated to Tcl_Filesystems by now. ***POTENTIAL INCOMPATIBILITY*** for any code still stuck in the pre-Tcl_Filesystem era. * generic/tclIntDecls.h: make genstubs * generic/tclStubInit.c: * generic/tclStrToD.c: Removed dead code that permitted disabling of recognition of the new 0b and 0o numeric formats. * generic/tclExecute.c: Removed dead code that implemented alternative * generic/tclObj.c: design where numeric values did not automatically narrow to the smallest Tcl_ObjType required to hold them.
* Added comment about potential improvement to Tcl_GetBignumAndClearObj.dgp2006-03-291-1/+7
|
* missing statics revealed by 'make checkexports'das2006-03-161-2/+2
|
* missing staticdgp2006-03-101-2/+2
|
* * generic/tclObj.c: Compatibility support for existing code thatdgp2006-03-031-2/+12
| | | | calls Tcl_GetObjType("boolean").
* Export stubs for libtommath; fix mingw compiler warningsKevin B Kenny2005-12-131-2/+2
|
* * unix/tcl.m4 (Darwin): add 64bit support, check for Tiger copyfile(),das2005-11-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* * generic/tclObj.c (GetBignumFromObj): replace NULL withMiguel Sofer2005-11-181-2/+2
| | | | | | tclEmptyStringRep to stop memcpy from complaining in a debug build (the corresponding branch is eliminated by the optimiser otherwise).
* * generic/tclListObj.c: Restored the SetListFromAny routine todgp2005-11-181-1/+2
| | | | | | | * generic/tclObj.c: the "list" Tcl_ObjType, and restored the Tcl_RegisterObjType() call for "list". This addresses the needs of some "bridge" extensions to examine whether the Tcl_ObjType of a Tcl_Obj is that of the "list" Tcl_ObjType.
* * generic/tclBasic.c (Tcl_DeleteCommandFromToken):Miguel Sofer2005-11-131-2/+2
| | | | | | * generic/tclObj.c (Tcl_GetCommandFromObj): more partial fixes for [Bug 1354540] - making sure that cached references to a command being deleted cannot be made reusable by a delete trace.
* * generic/tclBasic.c (Tcl_DeleteCommandFromToken):Miguel Sofer2005-11-111-2/+2
| | | | | | | | | * generic/tclObj.c (Tcl_GetCommandFromObj): bump the cmd epoch early to insure that cached references to this command are invalidated. Partial fix for [Bug 1352734] - at least insures that namespace-51.13 does not cause a panic. The test is still marked as knownbug, pending resolution of what is actually the correct return value ([Bug 1354540])
* ANSIfydkf2005-11-021-438/+454
|
* TIP#237 IMPLEMENTATIONdgp2005-10-081-716/+555
| | | | | | [kennykb-numerics-branch] Resynchronized with the HEAD; at this checkpoint [-rkennykb-numerics-branch-20051008], the HEAD and kennykb-numerics-branch contain identical code.
* Make symbol static to stop it from being visible outside the Tcl library ondkf2005-09-051-2/+2
| | | | traditional Unix platforms. [Bug 1263012]
* fix a namespace clash with pendingObjData.georgeps2005-08-171-2/+2
|
* silence compiler warningdgp2005-08-041-2/+2
|