diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2014-06-03 11:24:11 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2014-06-03 11:24:11 (GMT) |
commit | 07f1821ced9ccf739badabbba75ae09f5bdb7521 (patch) | |
tree | fd16b3047c0ab10b7b6640781a6aa283f9ba310a /generic | |
parent | 01977b9ff82689c9735a9395986a94a85d1552c4 (diff) | |
download | tk-07f1821ced9ccf739badabbba75ae09f5bdb7521.zip tk-07f1821ced9ccf739badabbba75ae09f5bdb7521.tar.gz tk-07f1821ced9ccf739badabbba75ae09f5bdb7521.tar.bz2 |
Use Tcl_FindCommand in stead of Tcl_GetCommandInfo where this suffices.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkImage.c | 4 | ||||
-rw-r--r-- | generic/tkMenu.c | 3 |
2 files changed, 2 insertions, 5 deletions
diff --git a/generic/tkImage.c b/generic/tkImage.c index e22b735..359d6c6 100644 --- a/generic/tkImage.c +++ b/generic/tkImage.c @@ -283,13 +283,11 @@ Tk_ImageObjCmd( */ if ((objc == 3) || (*(arg = Tcl_GetString(objv[3])) == '-')) { - Tcl_CmdInfo dummy; - do { dispPtr->imageId++; sprintf(idString, "image%d", dispPtr->imageId); name = idString; - } while (Tcl_GetCommandInfo(interp, name, &dummy) != 0); + } while (Tcl_FindCommand(interp, name, NULL, 0) != NULL); firstOption = 3; } else { TkWindow *topWin; diff --git a/generic/tkMenu.c b/generic/tkMenu.c index cd9ff08..1af9b88 100644 --- a/generic/tkMenu.c +++ b/generic/tkMenu.c @@ -3044,7 +3044,6 @@ TkNewMenuName( char *destString; int i; int doDot; - Tcl_CmdInfo cmdInfo; Tcl_HashTable *nameTablePtr = NULL; TkWindow *winPtr = (TkWindow *) menuPtr->tkwin; const char *parentName = Tcl_GetString(parentPtr); @@ -3084,7 +3083,7 @@ TkNewMenuName( Tcl_DecrRefCount(intPtr); } destString = Tcl_GetString(resultPtr); - if ((Tcl_GetCommandInfo(interp, destString, &cmdInfo) == 0) + if ((Tcl_FindCommand(interp, destString, NULL, 0) == NULL) && ((nameTablePtr == NULL) || (Tcl_FindHashEntry(nameTablePtr, destString) == NULL))) { break; |