diff options
author | dgp <dgp@users.sourceforge.net> | 2003-04-16 23:33:43 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2003-04-16 23:33:43 (GMT) |
commit | 221d64cae9a7781a4b3dd2a2e2e273fd6196c09e (patch) | |
tree | 4156c4da5bb0e708ca942f78b5c01ec34686f8bb /generic/tclCmdAH.c | |
parent | caa2e40c5ef3e6d45edebe3e156b25903fb30eba (diff) | |
download | tcl-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/tclCmdAH.c')
-rw-r--r-- | generic/tclCmdAH.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 25574ad..0536dd2 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.30 2003/04/08 22:55:09 dkf Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.31 2003/04/16 23:33:43 dgp Exp $ */ #include "tclInt.h" @@ -1949,10 +1949,8 @@ Tcl_FormatObjCmd(dummy, interp, objc, objv) * it's a one-word value. */ double doubleValue; /* Used to hold value to pass to sprintf if * it's a double value. */ -#ifndef TCL_WIDE_INT_IS_LONG Tcl_WideInt wideValue; /* Used to hold value to pass to sprintf if * it's a 'long long' value. */ -#endif /* TCL_WIDE_INT_IS_LONG */ int whichValue; /* Indicates which of intValue, ptrValue, * or doubleValue has the value to pass to * sprintf, according to the following @@ -1991,9 +1989,7 @@ Tcl_FormatObjCmd(dummy, interp, objc, objv) * been set for the current field. */ int gotZero; /* Non-zero indicates that a zero flag has * been seen in the current field. */ -#ifndef TCL_WIDE_INT_IS_LONG int useWide; /* Value to be printed is Tcl_WideInt. */ -#endif /* TCL_WIDE_INT_IS_LONG */ /* * This procedure is a bit nasty. The goal is to use sprintf to @@ -2024,9 +2020,7 @@ Tcl_FormatObjCmd(dummy, interp, objc, objv) width = precision = noPercent = useShort = 0; gotZero = gotMinus = gotPrecision = 0; -#ifndef TCL_WIDE_INT_IS_LONG useWide = 0; -#endif /* TCL_WIDE_INT_IS_LONG */ whichValue = PTR_VALUE; /* @@ -2170,7 +2164,6 @@ Tcl_FormatObjCmd(dummy, interp, objc, objv) } } if (*format == 'l') { -#ifndef TCL_WIDE_INT_IS_LONG useWide = 1; /* * Only add a 'll' modifier for integer values as it makes @@ -2186,7 +2179,6 @@ Tcl_FormatObjCmd(dummy, interp, objc, objv) strcpy(newPtr, TCL_LL_MODIFIER); newPtr += TCL_LL_MODIFIER_SIZE; } -#endif /* TCL_WIDE_INT_IS_LONG */ format++; } else if (*format == 'h') { useShort = 1; @@ -2208,7 +2200,6 @@ Tcl_FormatObjCmd(dummy, interp, objc, objv) case 'u': case 'x': case 'X': -#ifndef TCL_WIDE_INT_IS_LONG if (useWide) { if (Tcl_GetWideIntFromObj(interp, /* INTL: Tcl source. */ objv[objIndex], &wideValue) != TCL_OK) { @@ -2218,7 +2209,6 @@ Tcl_FormatObjCmd(dummy, interp, objc, objv) size = 40 + precision; break; } -#endif /* TCL_WIDE_INT_IS_LONG */ if (Tcl_GetLongFromObj(interp, /* INTL: Tcl source. */ objv[objIndex], &intValue) != TCL_OK) { goto fmtError; @@ -2319,11 +2309,9 @@ Tcl_FormatObjCmd(dummy, interp, objc, objv) case DOUBLE_VALUE: sprintf(dst, newFormat, doubleValue); /* INTL: user locale. */ break; -#ifndef TCL_WIDE_INT_IS_LONG case WIDE_VALUE: sprintf(dst, newFormat, wideValue); break; -#endif /* TCL_WIDE_INT_IS_LONG */ case INT_VALUE: if (useShort) { sprintf(dst, newFormat, (short) intValue); |