summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.h
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2003-04-16 23:31:33 (GMT)
committerdgp <dgp@users.sourceforge.net>2003-04-16 23:31:33 (GMT)
commit98546bb8b6be883f790f5d6ba1ef37151165116a (patch)
tree467609e01abca9216802d76c8cfaa88a2d166c0c /generic/tclInt.h
parentb97ca5b2bb3826e20a13ff1583baf7df0d8754f6 (diff)
downloadtcl-98546bb8b6be883f790f5d6ba1ef37151165116a.zip
tcl-98546bb8b6be883f790f5d6ba1ef37151165116a.tar.gz
tcl-98546bb8b6be883f790f5d6ba1ef37151165116a.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:
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r--generic/tclInt.h24
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