summaryrefslogtreecommitdiffstats
path: root/generic/tclTimer.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2016-03-30 17:15:44 (GMT)
committerdgp <dgp@users.sourceforge.net>2016-03-30 17:15:44 (GMT)
commit7721fe8b51fce18f525df0bbf8328e84ce97c693 (patch)
treee003d15f42fcf4d3e25213168c505784767243ea /generic/tclTimer.c
parentf324e94785a86a0595c4aac3e503c696bfa2dd40 (diff)
downloadtcl-7721fe8b51fce18f525df0bbf8328e84ce97c693.zip
tcl-7721fe8b51fce18f525df0bbf8328e84ce97c693.tar.gz
tcl-7721fe8b51fce18f525df0bbf8328e84ce97c693.tar.bz2
Remove direct access to Tcl_Obj typePtr field that does nothing of any
obvious benefit.
Diffstat (limited to 'generic/tclTimer.c')
-rw-r--r--generic/tclTimer.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/generic/tclTimer.c b/generic/tclTimer.c
index c10986a..d819657 100644
--- a/generic/tclTimer.c
+++ b/generic/tclTimer.c
@@ -789,7 +789,7 @@ Tcl_AfterObjCmd(
AfterInfo *afterPtr;
AfterAssocData *assocPtr;
int length;
- int index;
+ int index = -1;
static const char *const afterSubCmds[] = {
"cancel", "idle", "info", NULL
};
@@ -818,15 +818,9 @@ Tcl_AfterObjCmd(
* First lets see if the command was passed a number as the first argument.
*/
- if (objv[1]->typePtr == &tclIntType
-#ifndef TCL_WIDE_INT_IS_LONG
- || objv[1]->typePtr == &tclWideIntType
-#endif
- || objv[1]->typePtr == &tclBignumType
- || (Tcl_GetIndexFromObj(NULL, objv[1], afterSubCmds, "", 0,
- &index) != TCL_OK)) {
- index = -1;
- if (Tcl_GetWideIntFromObj(NULL, objv[1], &ms) != TCL_OK) {
+ if (Tcl_GetWideIntFromObj(NULL, objv[1], &ms) != TCL_OK) {
+ if (Tcl_GetIndexFromObj(NULL, objv[1], afterSubCmds, "", 0, &index)
+ != TCL_OK) {
const char *arg = Tcl_GetString(objv[1]);
Tcl_SetObjResult(interp, Tcl_ObjPrintf(