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 | f41390747c3db9237b5c2da437e6b9b721d73ab3 (patch) | |
tree | 7e610346500378ed3ca024070310e9532c887134 | |
parent | 6c9d67ac2ce6b610bb42688c03d6abf8e99f2a6b (diff) | |
download | tk-f41390747c3db9237b5c2da437e6b9b721d73ab3.zip tk-f41390747c3db9237b5c2da437e6b9b721d73ab3.tar.gz tk-f41390747c3db9237b5c2da437e6b9b721d73ab3.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; |