diff options
author | dgp <dgp@noemail.net> | 2003-04-16 23:31:33 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2003-04-16 23:31:33 (GMT) |
commit | 21b342be9b57db2c1700a6aba0222b82772ea0bf (patch) | |
tree | 467609e01abca9216802d76c8cfaa88a2d166c0c /generic/tclInt.h | |
parent | ca5061330484362dc803f737669f1203f31f0141 (diff) | |
download | tcl-21b342be9b57db2c1700a6aba0222b82772ea0bf.zip tcl-21b342be9b57db2c1700a6aba0222b82772ea0bf.tar.gz tcl-21b342be9b57db2c1700a6aba0222b82772ea0bf.tar.bz2 |
* generic/tcl.h Made changes so that the "wideInt" Tcl_ObjType
* 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:
FossilOrigin-Name: 4657eb7ea0eed71ec0569f92079583a33c22ba62
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r-- | generic/tclInt.h | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h index 077c65b..39343aa 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.118.2.2 2003/03/21 03:24:08 dgp Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.118.2.3 2003/04/16 23:31:44 dgp Exp $ */ #ifndef _TCLINT @@ -1564,9 +1564,7 @@ extern Tcl_ObjType tclStringType; extern Tcl_ObjType tclArraySearchType; extern Tcl_ObjType tclIndexType; extern Tcl_ObjType tclNsNameType; -#ifndef TCL_WIDE_INT_IS_LONG extern Tcl_ObjType tclWideIntType; -#endif /* * Variables denoting the hash key types defined in the core. @@ -2211,6 +2209,26 @@ extern Tcl_Mutex tclObjMutex; /* *---------------------------------------------------------------- + * Macro used by the Tcl core to get a Tcl_WideInt value out of + * a Tcl_Obj of the "wideInt" type. Different implementation on + * different platforms depending whether TCL_WIDE_INT_IS_LONG. + *---------------------------------------------------------------- + */ + +#ifdef TCL_WIDE_INT_IS_LONG +# define TclGetWide(resultVar, objPtr) \ + (resultVar) = (objPtr)->internalRep.longValue +# define TclGetLongFromWide(resultVar, objPtr) \ + (resultVar) = (objPtr)->internalRep.longValue +#else +# define TclGetWide(resultVar, objPtr) \ + (resultVar) = (objPtr)->internalRep.wideValue +# define TclGetLongFromWide(resultVar, objPtr) \ + (resultVar) = Tcl_WideAsLong((objPtr)->internalRep.wideValue) +#endif + +/* + *---------------------------------------------------------------- * Macro used by the Tcl core get a unicode char from a utf string. * It checks to see if we have a one-byte utf char before calling * the real Tcl_UtfToUniChar, as this will save a lot of time for |