summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.h
diff options
context:
space:
mode:
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