Tk Source Code

Check-in [777211ed]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

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

Overview
Comment:Add missing INT2PTR (doesn't cause warning with Tcl8.x, but does with Tcl 9.0). One None -> NULL change which was still missing. Backported from trunk.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-6-branch
Files: files | file ages | folders
SHA3-256: 777211ed8a0d336e9c6ce09518250d2f439e282b195947117c393c55efa2fedb
User & Date: jan.nijtmans 2019-05-17 07:21:59
Context
2019-05-18
13:05
Finally got timing of initializing NSServices object correct; code cleanup; merge in 8.6 to pick up changes in Tk initialization code check-in: f126b00e user: kevin_walzer tags: mac_services
2019-05-17
12:38
In Aqua, protect against double release of clipping regions. check-in: 1304e06d user: culler tags: core-8-6-branch
07:28
Merge 8.6 check-in: 701036f9 user: jan.nijtmans tags: trunk
07:21
Add missing INT2PTR (doesn't cause warning with Tcl8.x, but does with Tcl 9.0). One None -> NULL change which was still missing. Backported from trunk. check-in: 777211ed user: jan.nijtmans tags: core-8-6-branch
2019-05-16
19:54
Fix bug [d1989fb7cf]: In Aqua the root window appears before Tk_Mainloop is called. check-in: 364c9099 user: culler tags: core-8-6-branch
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to generic/tkButton.c.

  1632   1632   			TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
  1633   1633   			ButtonVarProc, probe);
  1634   1634   		if (probe == (ClientData)butPtr) {
  1635   1635   		    break;
  1636   1636   		}
  1637   1637   	    } while (probe);
  1638   1638   	    if (probe) {
  1639         -		/* 
         1639  +		/*
  1640   1640   		 * We were able to fetch the unset trace for our
  1641   1641   		 * selVarNamePtr, which means it is not unset and not
  1642   1642   		 * the cause of this unset trace. Instead some outdated
  1643   1643   		 * former variable must be, and we should ignore it.
  1644   1644   		 */
  1645   1645   		goto redisplay;
  1646   1646   	    }
................................................................................
  1735   1735        */
  1736   1736   
  1737   1737       if (flags & TCL_TRACE_UNSETS) {
  1738   1738   	if (!Tcl_InterpDeleted(interp) && butPtr->textVarNamePtr != NULL) {
  1739   1739   
  1740   1740   	    /*
  1741   1741   	     * An unset trace on some variable brought us here, but is it
  1742         -	     * the variable we have stored in butPtr->textVarNamePtr ? 
         1742  +	     * the variable we have stored in butPtr->textVarNamePtr ?
  1743   1743   	     */
  1744   1744   
  1745   1745   	    ClientData probe = NULL;
  1746   1746   
  1747   1747   	    do {
  1748   1748   		probe = Tcl_VarTraceInfo(interp,
  1749   1749   			Tcl_GetString(butPtr->textVarNamePtr),
................................................................................
  1750   1750   			TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
  1751   1751   			ButtonTextVarProc, probe);
  1752   1752   		if (probe == (ClientData)butPtr) {
  1753   1753   		    break;
  1754   1754   		}
  1755   1755   	    } while (probe);
  1756   1756   	    if (probe) {
  1757         -		/* 
         1757  +		/*
  1758   1758   		 * We were able to fetch the unset trace for our
  1759   1759   		 * textVarNamePtr, which means it is not unset and not
  1760   1760   		 * the cause of this unset trace. Instead some outdated
  1761   1761   		 * former textvariable must be, and we should ignore it.
  1762   1762   		 */
  1763   1763   		return NULL;
  1764   1764   	    }

Changes to generic/tkMenu.c.

  2521   2521                           TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
  2522   2522                           MenuVarProc, probe);
  2523   2523                   if (probe == (ClientData)mePtr) {
  2524   2524                       break;
  2525   2525                   }
  2526   2526           } while (probe);
  2527   2527           if (probe) {
  2528         -                /* 
         2528  +                /*
  2529   2529                    * We were able to fetch the unset trace for our
  2530   2530                    * namePtr, which means it is not unset and not
  2531   2531                    * the cause of this unset trace. Instead some outdated
  2532   2532                    * former variable must be, and we should ignore it.
  2533   2533                    */
  2534   2534   		return NULL;
  2535   2535           }

Changes to generic/tkScale.c.

  1367   1367                           TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
  1368   1368                           ScaleVarProc, probe);
  1369   1369                   if (probe == (ClientData)scalePtr) {
  1370   1370                       break;
  1371   1371                   }
  1372   1372               } while (probe);
  1373   1373               if (probe) {
  1374         -                /* 
         1374  +                /*
  1375   1375                    * We were able to fetch the unset trace for our
  1376   1376                    * varNamePtr, which means it is not unset and not
  1377   1377                    * the cause of this unset trace. Instead some outdated
  1378   1378                    * former variable must be, and we should ignore it.
  1379   1379                    */
  1380   1380                   return NULL;
  1381   1381               }

Changes to macosx/tkMacOSXDialog.c.

  2076   2076       XEvent *eventPtr)
  2077   2077   {
  2078   2078       FontchooserData *fcdPtr = clientData;
  2079   2079   
  2080   2080       if (eventPtr->type == DestroyNotify) {
  2081   2081   	Tk_DeleteEventHandler(fcdPtr->parent, StructureNotifyMask,
  2082   2082   		FontchooserParentEventHandler, fcdPtr);
  2083         -	fcdPtr->parent = None;
         2083  +	fcdPtr->parent = NULL;
  2084   2084   	FontchooserHideCmd(NULL, NULL, 0, NULL);
  2085   2085       }
  2086   2086   }
  2087   2087   
  2088   2088   /*
  2089   2089    * ----------------------------------------------------------------------
  2090   2090    *

Changes to macosx/tkMacOSXKeyboard.c.

   176    176       KeyInfo *kPtr;
   177    177       int dummy;
   178    178   
   179    179       Tcl_InitHashTable(&keycodeTable, TCL_ONE_WORD_KEYS);
   180    180       for (kPtr = keyArray; kPtr->keycode != 0; kPtr++) {
   181    181   	hPtr = Tcl_CreateHashEntry(&keycodeTable, INT2PTR(kPtr->keycode),
   182    182   		&dummy);
   183         -	Tcl_SetHashValue(hPtr, kPtr->keysym);
          183  +	Tcl_SetHashValue(hPtr, INT2PTR(kPtr->keysym));
   184    184       }
   185    185       Tcl_InitHashTable(&vkeyTable, TCL_ONE_WORD_KEYS);
   186    186       for (kPtr = virtualkeyArray; kPtr->keycode != 0; kPtr++) {
   187    187   	hPtr = Tcl_CreateHashEntry(&vkeyTable, INT2PTR(kPtr->keycode),
   188    188   		&dummy);
   189         -	Tcl_SetHashValue(hPtr, kPtr->keysym);
          189  +	Tcl_SetHashValue(hPtr, INT2PTR(kPtr->keysym));
   190    190       }
   191    191       initialized = 1;
   192    192   }
   193    193   
   194    194   /*
   195    195    *----------------------------------------------------------------------
   196    196    *