diff options
author | dgp <dgp@users.sourceforge.net> | 2008-09-17 18:11:31 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2008-09-17 18:11:31 (GMT) |
commit | 68778453cedcc72078811676bbb0ae096624bb61 (patch) | |
tree | 3ff5b0d08fc6c11734a851a66f7a5c85907a26ca /generic/tclInt.h | |
parent | 988b6b7363ad3960973bce0c1bb8d6b3cefe289f (diff) | |
download | tcl-68778453cedcc72078811676bbb0ae096624bb61.zip tcl-68778453cedcc72078811676bbb0ae096624bb61.tar.gz tcl-68778453cedcc72078811676bbb0ae096624bb61.tar.bz2 |
* generic/tclInt.h: Correct the TclGetLongFromObj,
TclGetIntFromObj, and TclGetIntForIndexM macros so that they
retrieve the internalRep.longValue field instead of casting the
internalRep.otherValuePtr field to type long.
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r-- | generic/tclInt.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h index f9a53a9..10deb4c 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -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: tclInt.h,v 1.396 2008/08/24 14:38:11 dkf Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.397 2008/09/17 18:11:32 dgp Exp $ */ #ifndef _TCLINT @@ -2281,17 +2281,17 @@ typedef struct List { #define TclGetLongFromObj(interp, objPtr, longPtr) \ (((objPtr)->typePtr == &tclIntType) \ - ? ((*(longPtr) = (long) (objPtr)->internalRep.otherValuePtr), TCL_OK) \ + ? ((*(longPtr) = (objPtr)->internalRep.longValue), TCL_OK) \ : Tcl_GetLongFromObj((interp), (objPtr), (longPtr))) #if (LONG_MAX == INT_MAX) #define TclGetIntFromObj(interp, objPtr, intPtr) \ (((objPtr)->typePtr == &tclIntType) \ - ? ((*(intPtr) = (long) (objPtr)->internalRep.otherValuePtr), TCL_OK) \ + ? ((*(intPtr) = (objPtr)->internalRep.longValue), TCL_OK) \ : Tcl_GetIntFromObj((interp), (objPtr), (intPtr))) #define TclGetIntForIndexM(interp, objPtr, endValue, idxPtr) \ (((objPtr)->typePtr == &tclIntType) \ - ? ((*(idxPtr) = (long) (objPtr)->internalRep.otherValuePtr), TCL_OK) \ + ? ((*(idxPtr) = (objPtr)->internalRep.longValue), TCL_OK) \ : TclGetIntForIndex((interp), (objPtr), (endValue), (idxPtr))) #else #define TclGetIntFromObj(interp, objPtr, intPtr) \ |