diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2009-01-09 11:21:45 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2009-01-09 11:21:45 (GMT) |
commit | 4a6ee21a80ee4a00adc8da96ed88329e7faaebf4 (patch) | |
tree | 4aa51d7f8297e2b7b5f11c316610f06e345c362d /generic/tclObj.c | |
parent | 06b98b063ae2d87532d9940f8ff0a6409fa86f58 (diff) | |
download | tcl-4a6ee21a80ee4a00adc8da96ed88329e7faaebf4.zip tcl-4a6ee21a80ee4a00adc8da96ed88329e7faaebf4.tar.gz tcl-4a6ee21a80ee4a00adc8da96ed88329e7faaebf4.tar.bz2 |
Style fixes (unfouling whitespace, sorting comments, removing useless casts, etc.)
Diffstat (limited to 'generic/tclObj.c')
-rw-r--r-- | generic/tclObj.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/generic/tclObj.c b/generic/tclObj.c index e73fa17..2b2219a 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.146 2009/01/08 16:41:34 dkf Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.147 2009/01/09 11:21:46 dkf Exp $ */ #include "tclInt.h" @@ -1319,7 +1319,7 @@ Tcl_GetBooleanFromObj( * sets the proper error message for us. */ - double d; + double d; if (Tcl_GetDoubleFromObj(interp, objPtr, &d) != TCL_OK) { return TCL_ERROR; @@ -1706,8 +1706,9 @@ Tcl_GetDoubleFromObj( } if (objPtr->typePtr == &tclBignumType) { mp_int big; - UNPACK_BIGNUM( objPtr, big ); - *dblPtr = TclBignumToDouble( &big ); + + UNPACK_BIGNUM(objPtr, big); + *dblPtr = TclBignumToDouble(&big); return TCL_OK; } #ifndef NO_WIDE_TYPE @@ -2185,8 +2186,8 @@ Tcl_GetLongFromObj( goto tooLarge; } #endif - if (objPtr->typePtr == &tclDoubleType) { - if (interp != NULL) { + if (objPtr->typePtr == &tclDoubleType) { + if (interp != NULL) { Tcl_Obj *msg; TclNewLiteralStringObj(msg, "expected integer but got \""); @@ -2197,7 +2198,7 @@ Tcl_GetLongFromObj( } return TCL_ERROR; } - if (objPtr->typePtr == &tclBignumType) { + if (objPtr->typePtr == &tclBignumType) { /* * Must check for those bignum values that can fit in a long, even * when auto-narrowing is enabled. Only those values in the signed @@ -2488,8 +2489,8 @@ Tcl_GetWideIntFromObj( *wideIntPtr = (Tcl_WideInt) objPtr->internalRep.longValue; return TCL_OK; } - if (objPtr->typePtr == &tclDoubleType) { - if (interp != NULL) { + if (objPtr->typePtr == &tclDoubleType) { + if (interp != NULL) { Tcl_Obj *msg; TclNewLiteralStringObj(msg, "expected integer but got \""); @@ -2500,7 +2501,7 @@ Tcl_GetWideIntFromObj( } return TCL_ERROR; } - if (objPtr->typePtr == &tclBignumType) { + if (objPtr->typePtr == &tclBignumType) { /* * Must check for those bignum values that can fit in a * Tcl_WideInt, even when auto-narrowing is enabled. @@ -3050,7 +3051,8 @@ int TclGetNumberFromObj( static Tcl_ThreadDataKey bignumKey; mp_int *bigPtr = Tcl_GetThreadData(&bignumKey, (int) sizeof(mp_int)); - UNPACK_BIGNUM( objPtr, *bigPtr ); + + UNPACK_BIGNUM(objPtr, *bigPtr); *typePtr = TCL_NUMBER_BIG; *clientDataPtr = bigPtr; return TCL_OK; |