summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-04-07 15:11:47 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-04-07 15:11:47 (GMT)
commit26cbbcb5bfbd9c1910f9b51e67983c994f42e196 (patch)
treed71446dd84393d33318cd8ee9221db84daf27d8a /generic
parente8bb79afed0a1a28c88946874b30294a9df08c06 (diff)
downloadtcl-26cbbcb5bfbd9c1910f9b51e67983c994f42e196.zip
tcl-26cbbcb5bfbd9c1910f9b51e67983c994f42e196.tar.gz
tcl-26cbbcb5bfbd9c1910f9b51e67983c994f42e196.tar.bz2
Minor simplification in tcl.h: For the Tcl_WideAsLong/Tcl_LongAsWide/Tcl_WideAsDouble/Tcl_DoubleAsWide #defines, one set suffices: No need to have two versions depending on TCL_WIDE_INT_IS_LONG.
Diffstat (limited to 'generic')
-rw-r--r--generic/tcl.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/generic/tcl.h b/generic/tcl.h
index 731724e..6ec47c6 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -419,10 +419,6 @@ typedef TCL_WIDE_INT_TYPE Tcl_WideInt;
typedef unsigned TCL_WIDE_INT_TYPE Tcl_WideUInt;
#ifdef TCL_WIDE_INT_IS_LONG
-# define Tcl_WideAsLong(val) ((long)(val))
-# define Tcl_LongAsWide(val) ((long)(val))
-# define Tcl_WideAsDouble(val) ((double)((long)(val)))
-# define Tcl_DoubleAsWide(val) ((long)((double)(val)))
# ifndef TCL_LL_MODIFIER
# define TCL_LL_MODIFIER "l"
# endif /* !TCL_LL_MODIFIER */
@@ -434,12 +430,13 @@ typedef unsigned TCL_WIDE_INT_TYPE Tcl_WideUInt;
# ifndef TCL_LL_MODIFIER
# define TCL_LL_MODIFIER "ll"
# endif /* !TCL_LL_MODIFIER */
-# define Tcl_WideAsLong(val) ((long)((Tcl_WideInt)(val)))
-# define Tcl_LongAsWide(val) ((Tcl_WideInt)((long)(val)))
-# define Tcl_WideAsDouble(val) ((double)((Tcl_WideInt)(val)))
-# define Tcl_DoubleAsWide(val) ((Tcl_WideInt)((double)(val)))
#endif /* TCL_WIDE_INT_IS_LONG */
+#define Tcl_WideAsLong(val) ((long)((Tcl_WideInt)(val)))
+#define Tcl_LongAsWide(val) ((Tcl_WideInt)((long)(val)))
+#define Tcl_WideAsDouble(val) ((double)((Tcl_WideInt)(val)))
+#define Tcl_DoubleAsWide(val) ((Tcl_WideInt)((double)(val)))
+
#if defined(_WIN32)
# ifdef __BORLANDC__
typedef struct stati64 Tcl_StatBuf;