Tk Source Code

Check-in [1a2f18b1]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:eliminate unnecessary Tcl_ConvertToType call
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1a2f18b12a7b2a7176fca675d60226d924cc594f
User & Date: jan.nijtmans 2013-02-01 16:07:52
Context
2013-02-04
19:50
ttk::treeview: schedule redisplay when adding or removing tags [Bug 3603077]. check-in: 78ab9345 user: jenglish tags: trunk
13:11
merge trunk Only call Tcl_RegisterObjType for Tcl 8 check-in: 31bb4e02 user: jan.nijtmans tags: novem-support
2013-02-01
16:07
eliminate unnecessary Tcl_ConvertToType call check-in: 1a2f18b1 user: jan.nijtmans tags: trunk
15:49
some more int -> size_t changes check-in: af0c7cac user: jan.nijtmans tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tkObj.c.

813
814
815
816
817
818
819
820
821
822

823
824

825
826
827
828
829
830
831
    Tcl_Interp *interp, 	/* Used for error reporting if not NULL. */
    Tk_Window tkwin,		/* A token to get the main window from. */
    Tcl_Obj *objPtr,		/* The object from which to get window. */
    Tk_Window *windowPtr)	/* Place to store resulting window. */
{
    TkMainInfo *mainPtr = ((TkWindow *) tkwin)->mainPtr;
    register WindowRep *winPtr;
    int result;

    result = Tcl_ConvertToType(interp, objPtr, &windowObjType);

    if (result != TCL_OK) {
	return result;

    }

    winPtr = objPtr->internalRep.twoPtrValue.ptr1;
    if (winPtr->tkwin == NULL
	    || winPtr->mainPtr == NULL
	    || winPtr->mainPtr != mainPtr
	    || winPtr->epoch != mainPtr->deletionEpoch) {







<

|
>
|
|
>







813
814
815
816
817
818
819

820
821
822
823
824
825
826
827
828
829
830
831
832
    Tcl_Interp *interp, 	/* Used for error reporting if not NULL. */
    Tk_Window tkwin,		/* A token to get the main window from. */
    Tcl_Obj *objPtr,		/* The object from which to get window. */
    Tk_Window *windowPtr)	/* Place to store resulting window. */
{
    TkMainInfo *mainPtr = ((TkWindow *) tkwin)->mainPtr;
    register WindowRep *winPtr;


    if (objPtr->typePtr != &windowObjType) {
	int result = SetWindowFromAny(interp, objPtr);
	if (result != TCL_OK) {
	    return result;
	}
    }

    winPtr = objPtr->internalRep.twoPtrValue.ptr1;
    if (winPtr->tkwin == NULL
	    || winPtr->mainPtr == NULL
	    || winPtr->mainPtr != mainPtr
	    || winPtr->epoch != mainPtr->deletionEpoch) {