summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-02-01 16:07:52 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-02-01 16:07:52 (GMT)
commitf41390747c3db9237b5c2da437e6b9b721d73ab3 (patch)
tree7e610346500378ed3ca024070310e9532c887134 /generic
parent6c9d67ac2ce6b610bb42688c03d6abf8e99f2a6b (diff)
downloadtk-f41390747c3db9237b5c2da437e6b9b721d73ab3.zip
tk-f41390747c3db9237b5c2da437e6b9b721d73ab3.tar.gz
tk-f41390747c3db9237b5c2da437e6b9b721d73ab3.tar.bz2
eliminate unnecessary Tcl_ConvertToType call
Diffstat (limited to 'generic')
-rw-r--r--generic/tkObj.c9
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;