diff options
Diffstat (limited to 'generic/tclObj.c')
-rw-r--r-- | generic/tclObj.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/generic/tclObj.c b/generic/tclObj.c index 28f00ff..f44f3af 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.136 2007/10/11 13:35:26 msofer Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.137 2007/11/11 19:32:16 msofer Exp $ */ #include "tclInt.h" @@ -493,7 +493,7 @@ Tcl_AppendAllObjTypes( * Get the test for a valid list out of the way first. */ - if (Tcl_ListObjLength(interp, objPtr, &numElems) != TCL_OK) { + if (TclListObjLength(interp, objPtr, &numElems) != TCL_OK) { return TCL_ERROR; } @@ -1422,7 +1422,7 @@ ParseBoolean( register Tcl_Obj *objPtr) /* The object to parse/convert. */ { int i, length, newBool; - char lowerCase[6], *str = Tcl_GetStringFromObj(objPtr, &length); + char lowerCase[6], *str = TclGetStringFromObj(objPtr, &length); if ((length == 0) || (length > 5)) { /* longest valid boolean string rep. is "false" */ @@ -1901,9 +1901,12 @@ Tcl_GetIntFromObj( register Tcl_Obj *objPtr, /* The object from which to get a int. */ register int *intPtr) /* Place to store resulting int. */ { +#if (LONG_MAX == INT_MAX) + return TclGetLongFromObj(interp, objPtr, (long *) intPtr); +#else long l; - if (Tcl_GetLongFromObj(interp, objPtr, &l) != TCL_OK) { + if (TclGetLongFromObj(interp, objPtr, &l) != TCL_OK) { return TCL_ERROR; } if ((ULONG_MAX > UINT_MAX) && ((l > UINT_MAX) || (l < -(long)UINT_MAX))) { @@ -1917,6 +1920,7 @@ Tcl_GetIntFromObj( } *intPtr = (int) l; return TCL_OK; +#endif } /* @@ -1941,7 +1945,7 @@ SetIntFromAny( Tcl_Obj *objPtr) /* Pointer to the object to convert */ { long l; - return Tcl_GetLongFromObj(interp, objPtr, &l); + return TclGetLongFromObj(interp, objPtr, &l); } /* |