| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
apparently missing word to complete a sentence.
* generic/tclObj.c (Tcl_DbDecrRefCount): Fixed whitespace nit in
panic message.
|
| |
|
| |
|
|
|
|
|
|
| |
* generic/tclEvent.c: order of finalization routines.
* generic/tclInt.h: [Bug 1251399]
* generic/tclObj.c:
|
| |
|
|
|
|
| |
Tcl_ObjType, as required by the tclcompiler application.
|
|
|
|
| |
hpux/native cc
|
|
|
|
|
|
|
|
|
|
|
|
| |
* generic/tclObj.c: that only string values like "yes" and "false"
* tests/obj.test: are kept as the "boolean" Tcl_ObjType. The
string values "0" and "1" are kept as "int" Tcl_ObjType, which also
produce quick calls to Tcl_GetBooleanFromObj(). Since this internal
change means a Tcl_ConvertToType to a "boolean" Tcl_ObjType might
not produce a Tcl_Obj of type "boolean", the registration of the
"boolean" type is also removed.
***POTENTIAL INCOMPATIBILITY***
For callers of Tcl_GetObjType on the type name "boolean".
|
|
|
|
|
|
|
|
|
|
|
| |
* tests/listObj.test: registration of the Tcl_ObjType's "list",
* tests/obj.test: "procbody", "index", "ensembleCommand",
"localVarName", and "levelReference". The only reason to register
a Tcl_ObjType is to have it returned by Tcl_GetObjType, and the
only reason for that is to retrieve a (Tcl_ObjType *) to pass to
Tcl_ConvertToType(). None of the types above can support a
Tcl_ConvertToType() call; they panic. Better not to offer something
than to lead users into a panic.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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:
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tcl_GetFoo() routines into wrappers around Tcl_GetFooFromObj().
Reduces code duplication, and the resulting potential for inconsistency.
* generic/tclObj.c: Several changes:
- Fixed Tcl_GetBooleanFromObj to agree with its documentation and
with Tcl_GetBoolean, accepting only "0" and "1" and not other
numeric strings. [Bug 1187123]
- Added new private routine TclGetTruthValueFromObj to perform
the more permissive conversion of numeric values to boolean
that is needed by the [expr] machinery.
* generic/tclInt.h (TclGetTruthValueFromObj): New routine.
* generic/tclExecute.c: Updated callers to call new routine.
* tests/obj.test: Corrected bad tests that actually expected
values like "47" and "0xac" to be accepted as booleans.
|
| |
|
|
|
|
|
|
|
|
|
| |
with trailing garbage receive a "not an integer" message instead of
an "integer too large" message.
Removed inactive code meant to deal with strtoul* routines that fail
to parse leading signs. All of them do, and if any are detected
that do not, the correct fix is replacement with compat/strtoul*.c,
not a lot of special care by the callers.
|
|
|
|
|
| |
* generic/tclObj.c (Tcl_GetIntFromObj): permit 0x80000000 to be
recognized as an integer on TCL_WIDE_INT_IS_LONG systems [Bug 1090869].
|
|
|
|
|
| |
* generic/tclObj.c: Change in TclDecrRefCount and TclFreeObj, to
speed up the freeing of simple Tcl_Obj [Patch 1174551]
|
|
|
|
|
|
|
|
|
| |
* generic/tclInt.h:
* generic/tclObj.c:
* generic/tclStringObj.c: defined new internal macros for creating
and setting frequently used obj types (int,long, wideInt, double,
string). Changed TEBC to use eg 'TclNewIntObj(objPtr, i)' to avoid
the function call in 'objPtr = Tcl_NewIntObj(i)'
|
|
|
|
| |
command names (as in fix [Patch 456668]).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
as strings every time through. [Patch 1037357]
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
for error return from 'mktime'.
* generic/tclObj.c (Tcl_GetIntFromObj): Corrected a problem where
demoting a wide to an int failed on a big-endian machine.
[Bug 1026125].
* tests/clock.test (clock-43.1): Added regression test for
error return from 'mktime'.
|
|
|
|
| |
TCL_WIDE_INT_IS_LONG platforms.
|
| |
|
| |
|
|
|
|
| |
breaks the core completely. :^}
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
* generic/tclObj.c (TclFreeObj): made TclFreeObj use the new macro
TclFreeObjMacro(), so that the allocation and freeing of Tcl_Obj
is defined in a single spot (the macros in tclInt.h), with the
exception of the TCL_MEM_DEBUG case.
The #ifdef logic for the corresponding macros has been reformulated
to make it clearer.
|
|
|
|
| |
Jeff Hobbs on the Tcl'ers Chat.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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):
|
|
|
|
|
| |
cargo-cult hangover from the hashing code in tclHash.c, but this looks
almost identical to that used for literals (which is fast.)
|
| |
|
|
|
|
| |
whitespace/style policing
|
|
|
|
|
|
|
| |
to 'Tcl_Panic' (the function). The #define
of panic in tcl.h clearly states it is
deprecated in the comments.
[Patch 865264]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
that appends a Tcl_Obj to the errorInfo, saving the caller the trouble
of extracting the string rep.
* generic/tclStringObj.c (TclAppendLimitedToObj): New internal
routine that supports truncated appends with optional ellipsis marking.
This single routine supports UTF-8-safe truncated appends needed in
several places throughout the Tcl source code, mostly for error and
stack messages. Clean fix for [Bug 760872].
* generic/tclInt.h: Declarations for new internal routines.
* generic/tclCmdMZ.c: Updated callers to use the new routines.
* generic/tclCompExpr.c:
* generic/tclCompile.c:
* generic/tclExecute.c:
* generic/tclIOUtil.c:
* generic/tclNamesp.c:
* generic/tclObj.c:
* generic/tclParseExpr.c:
* generic/tclProc.c:
* generic/tclStringObj.c:
* mac/tclMacResource.c:
* library/init.tcl: Updated ::errorInfo cleanup in [unknown] to
reflect slight modifications to Tcl_LogCommandInfo(). Corrects
failing init-4.* tests.
|
|
|
|
|
| |
* win/tclAppInit.c: to fix incompatible TCL_MEM_DEBUG handling in
* generic/tclObj.c: Win32 VC builds.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
since it made the sizeof(Tcl_Obj) different for
regular vs mem debug builds.
* generic/tclInt.h: Define TclDecrRefCount in terms
of Tcl_DbDecrRefCount which removes one layer of
inderection.
* generic/tclObj.c (TclDbInitNewObj, Tcl_DbIncrRefCount,
Tcl_DbDecrRefCount, Tcl_DbIsShared):
Define ThreadSpecificData that contains a hashtable.
The table is used to ensure that a Tcl_Obj is only
acted upon in the thread that allocated it. This
checking code is enabled only when mem debug and
threads are enabled.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the ref count of a Tcl_Obj is the thread that
originally allocated the thread. This fail fast
behavior will catch programming errors that
allow a single Tcl_Obj to be accessed from multiple
threads.
* generic/tcl.h (Tcl_Obj): Add allocThread member
to Tcl_Obj. This member records the thread id the
Tcl_Obj was allocated. It is used to check that
any future ref count incr or decr is done from
the same thread that allocated the Tcl_Obj.
This member is defined only when threads and
mem debug are enabled.
* generic/tclInt.h (TclNewObj, TclDbNewObj,
TclDecrRefCount):
Define TclNewObj and TclDbNewObj using TclDbInitNewObj
when mem debug is enabled. This fixes a problem where
TclNewObj calls did not work the same as TclDbNewObj
when mem debug was enabled.
* generic/tclObj.c (TclDbInitNewObj, Tcl_DbIncrRefCount,
Tcl_DbDecrRefCount): Add new helper to init Tcl_Obj
members when mem debug is enabled. Init the allocThread
member in TclDbInitNewObj and check it in
Tcl_DbIncrRefCount and Tcl_DbDecrRefCount to make sure
a Tcl_Obj allocated in one thread is not being acted
upon in another thread.
|
|
|
|
|
|
|
|
| |
management of the cmdName Tcl_ObjType the opposite way, to always
use the twoPtrValue instead of always using the otherValuePtr.
Previous fix on 2003-05-12 broke several extensions that wanted
to poke around with the twoPtrValue.ptr2 value of a cmdName
Tcl_Obj, like TclBlend and e4graph. [Bug 726018]
|
|
|
|
|
| |
otherValuePtr or the twoPtrValue.ptr1 fields to store a
(ResolvedCmdName *) as the internal rep. [Bug 726018].
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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:
|
|
|
|
| |
be defined (though not necessarily useful) everywhere.
|
| |
|