diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-02-01 16:07:52 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-02-01 16:07:52 (GMT) |
commit | 91f9f71eab6ea20a1d581c268868b3d03cb64a33 (patch) | |
tree | 7e610346500378ed3ca024070310e9532c887134 | |
parent | 266897fcf4c3441f12348d643b18a2d63e37f8aa (diff) | |
download | tk-91f9f71eab6ea20a1d581c268868b3d03cb64a33.zip tk-91f9f71eab6ea20a1d581c268868b3d03cb64a33.tar.gz tk-91f9f71eab6ea20a1d581c268868b3d03cb64a33.tar.bz2 |
eliminate unnecessary Tcl_ConvertToType call
-rw-r--r-- | generic/tkObj.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/generic/tkObj.c b/generic/tkObj.c index b027b0f..7c09656 100644 --- a/generic/tkObj.c +++ b/generic/tkObj.c @@ -817,11 +817,12 @@ TkGetWindowFromObj( { TkMainInfo *mainPtr = ((TkWindow *) tkwin)->mainPtr; register WindowRep *winPtr; - int result; - result = Tcl_ConvertToType(interp, objPtr, &windowObjType); - if (result != TCL_OK) { - return result; + if (objPtr->typePtr != &windowObjType) { + int result = SetWindowFromAny(interp, objPtr); + if (result != TCL_OK) { + return result; + } } winPtr = objPtr->internalRep.twoPtrValue.ptr1; |