summaryrefslogtreecommitdiffstats
path: root/generic/tclTest.c
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)
commit6cba1645ae7348223e6a1bce5b4f4362d1127528 (patch)
tree467609e01abca9216802d76c8cfaa88a2d166c0c /generic/tclTest.c
parent782dbac4af7f8eed25def7bfe1417a364a4b3ea0 (diff)
downloadtcl-6cba1645ae7348223e6a1bce5b4f4362d1127528.zip
tcl-6cba1645ae7348223e6a1bce5b4f4362d1127528.tar.gz
tcl-6cba1645ae7348223e6a1bce5b4f4362d1127528.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/tclTest.c')
-rw-r--r--generic/tclTest.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/generic/tclTest.c b/generic/tclTest.c
index ed7e0ad..327c470 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -14,7 +14,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclTest.c,v 1.62 2003/02/18 10:13:25 vincentdarley Exp $
+ * RCS: @(#) $Id: tclTest.c,v 1.62.2.1 2003/04/16 23:31:46 dgp Exp $
*/
#define TCL_TEST
@@ -2795,14 +2795,12 @@ TestMathFunc2(clientData, interp, args, resultPtr)
resultPtr->type = TCL_DOUBLE;
resultPtr->doubleValue = ((d0 > d1)? d0 : d1);
-#ifndef TCL_WIDE_INT_IS_LONG
} else if (args[1].type == TCL_WIDE_INT) {
Tcl_WideInt w0 = Tcl_LongAsWide(i0);
Tcl_WideInt w1 = args[1].wideValue;
resultPtr->type = TCL_WIDE_INT;
resultPtr->wideValue = ((w0 > w1)? w0 : w1);
-#endif
} else {
Tcl_SetResult(interp, "T3: wrong type for arg 2", TCL_STATIC);
result = TCL_ERROR;
@@ -2820,18 +2818,15 @@ TestMathFunc2(clientData, interp, args, resultPtr)
resultPtr->type = TCL_DOUBLE;
resultPtr->doubleValue = ((d0 > d1)? d0 : d1);
-#ifndef TCL_WIDE_INT_IS_LONG
} else if (args[1].type == TCL_WIDE_INT) {
double d1 = Tcl_WideAsDouble(args[1].wideValue);
resultPtr->type = TCL_DOUBLE;
resultPtr->doubleValue = ((d0 > d1)? d0 : d1);
-#endif
} else {
Tcl_SetResult(interp, "T3: wrong type for arg 2", TCL_STATIC);
result = TCL_ERROR;
}
-#ifndef TCL_WIDE_INT_IS_LONG
} else if (args[0].type == TCL_WIDE_INT) {
Tcl_WideInt w0 = args[0].wideValue;
@@ -2855,7 +2850,6 @@ TestMathFunc2(clientData, interp, args, resultPtr)
Tcl_SetResult(interp, "T3: wrong type for arg 2", TCL_STATIC);
result = TCL_ERROR;
}
-#endif
} else {
Tcl_SetResult(interp, "T3: wrong type for arg 1", TCL_STATIC);
result = TCL_ERROR;