summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdIL.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)
commit98546bb8b6be883f790f5d6ba1ef37151165116a (patch)
tree467609e01abca9216802d76c8cfaa88a2d166c0c /generic/tclCmdIL.c
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/tclCmdIL.c')
-rw-r--r--generic/tclCmdIL.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index 2c77649..48ddefb 100644
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.c
@@ -15,7 +15,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCmdIL.c,v 1.47 2003/02/27 16:01:55 dkf Exp $
+ * RCS: @(#) $Id: tclCmdIL.c,v 1.47.2.1 2003/04/16 23:31:43 dgp Exp $
*/
#include "tclInt.h"
@@ -323,12 +323,10 @@ Tcl_IncrObjCmd(dummy, interp, objc, objv)
if (objc == 2) {
incrAmount = 1;
} else {
-#ifdef TCL_WIDE_INT_IS_LONG
if (Tcl_GetLongFromObj(interp, objv[2], &incrAmount) != TCL_OK) {
Tcl_AddErrorInfo(interp, "\n (reading increment)");
return TCL_ERROR;
}
-#else
/*
* Need to be a bit cautious to ensure that [expr]-like rules
* are enforced for interpretation of wide integers, despite
@@ -337,7 +335,7 @@ Tcl_IncrObjCmd(dummy, interp, objc, objv)
if (objv[2]->typePtr == &tclIntType) {
incrAmount = objv[2]->internalRep.longValue;
} else if (objv[2]->typePtr == &tclWideIntType) {
- incrAmount = Tcl_WideAsLong(objv[2]->internalRep.wideValue);
+ TclGetLongFromWide(incrAmount,objv[2]);
} else {
Tcl_WideInt wide;
@@ -352,7 +350,6 @@ Tcl_IncrObjCmd(dummy, interp, objc, objv)
objv[2]->internalRep.longValue = incrAmount;
}
}
-#endif
}
/*