diff options
Diffstat (limited to 'generic/ttk/ttkNotebook.c')
-rw-r--r-- | generic/ttk/ttkNotebook.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/generic/ttk/ttkNotebook.c b/generic/ttk/ttkNotebook.c index 7ad46a4..784a38e 100644 --- a/generic/ttk/ttkNotebook.c +++ b/generic/ttk/ttkNotebook.c @@ -1079,7 +1079,7 @@ static int NotebookIdentifyCommand( return TCL_ERROR; } - if ( Tcl_GetIntFromObj(interp, objv[objc-2], &x) != TCL_OK + if (Tcl_GetIntFromObj(interp, objv[objc-2], &x) != TCL_OK || Tcl_GetIntFromObj(interp, objv[objc-1], &y) != TCL_OK || (objc == 5 && Tcl_GetIndexFromObjStruct(interp, objv[2], whatTable, sizeof(char *), "option", 0, &what) != TCL_OK) @@ -1108,9 +1108,8 @@ static int NotebookIdentifyCommand( } break; case IDENTIFY_TAB: - if (tabIndex != TCL_INDEX_NONE) { - Tcl_SetObjResult(interp, Tcl_NewWideIntObj(tabIndex)); - } + if (tabIndex != TCL_INDEX_NONE) + Tcl_SetObjResult(interp, TkNewIndexObj(tabIndex)); break; } return TCL_OK; @@ -1134,8 +1133,9 @@ static int NotebookIndexCommand( } status = FindTabIndex(interp, nb, objv[2], &index); - if (status == TCL_OK && index != TCL_INDEX_NONE) { - Tcl_SetObjResult(interp, Tcl_NewWideIntObj(index)); + if (status == TCL_OK) { + if (index != TCL_INDEX_NONE) + Tcl_SetObjResult(interp, TkNewIndexObj(index)); } return status; |