From 1903a8c143273706a5bceb7a0e034a1e0f783bb7 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 25 May 2022 12:55:23 +0000 Subject: Simplify solution for [76ad7aeba3]: No need to call TclGetNumberFromObj() twice, since it's already done inside TclGetIntFromObj() --- generic/tclCmdMZ.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index d57dc69..c94abbd 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -1590,21 +1590,9 @@ StringIsCmd( case STR_IS_GRAPH: chcomp = Tcl_UniCharIsGraph; break; - case STR_IS_INT: { - void *p; - int type; - if (TCL_OK == TclGetNumberFromObj(NULL, objPtr, &p, &type)) { - if (type == TCL_NUMBER_LONG -#ifndef TCL_WIDE_INT_IS_LONG - || type == TCL_NUMBER_WIDE -#endif - || type == TCL_NUMBER_BIG) { - /* [string is integer] is -UINT_MAX to UINT_MAX range */ - if (TclGetIntFromObj(NULL, objPtr, &i) == TCL_OK) { - break; - } - } - } + case STR_IS_INT: + if (TCL_OK == TclGetIntFromObj(NULL, objPtr, &i)) { + break; } goto failedIntParse; case STR_IS_ENTIER: -- cgit v0.12