summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.h
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2003-04-16 23:33:43 (GMT)
committerdgp <dgp@users.sourceforge.net>2003-04-16 23:33:43 (GMT)
commit221d64cae9a7781a4b3dd2a2e2e273fd6196c09e (patch)
tree4156c4da5bb0e708ca942f78b5c01ec34686f8bb /generic/tclInt.h
parentcaa2e40c5ef3e6d45edebe3e156b25903fb30eba (diff)
downloadtcl-221d64cae9a7781a4b3dd2a2e2e273fd6196c09e.zip
tcl-221d64cae9a7781a4b3dd2a2e2e273fd6196c09e.tar.gz
tcl-221d64cae9a7781a4b3dd2a2e2e273fd6196c09e.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 02290fa..a4753b9 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.123 2003/04/05 01:41:23 dkf Exp $
+ * RCS: @(#) $Id: tclInt.h,v 1.124 2003/04/16 23:33:44 dgp Exp $
*/
#ifndef _TCLINT
@@ -1561,9 +1561,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.
@@ -2215,6 +2213,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