Skip to content

Commit

Permalink
Fix [bcbf4c9875]: Tk intialization overwrites thread specific data
Browse files Browse the repository at this point in the history
  • Loading branch information
jan.nijtmans committed Nov 25, 2024
1 parent e4d2870 commit 61968d5
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 36 deletions.
3 changes: 3 additions & 0 deletions changes
Original file line number Diff line number Diff line change
Expand Up @@ -8249,4 +8249,7 @@ Tk Cocoa 2.0: More drawing internals refinements (culler,walzer)
2024-11-13 (bug) [36e379] [macOS Ventura] Workaround for X11 build with
XQuartz: crash in XLoadQueryFont (vogel)

2024-11-25 (bug) [bcbf4c] Tk intialization overwrites thread specific data
(emiliano)

- Released 8.6.16, ??? ??, 2024 - https://core.tcl-lang.org/tk/ for details
34 changes: 0 additions & 34 deletions generic/tkEvent.c
Original file line number Diff line number Diff line change
Expand Up @@ -981,40 +981,6 @@ Tk_DeleteClientMessageHandler(
}
}

/*
*----------------------------------------------------------------------
*
* TkEventInit --
*
* This functions initializes all the event module structures used by the
* current thread. It must be called before any other function in this
* file is called.
*
* Results:
* None.
*
* Side Effects:
* None.
*
*----------------------------------------------------------------------
*/

void
TkEventInit(void)
{
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));

tsdPtr->handlersActive = 0;
tsdPtr->pendingPtr = NULL;
tsdPtr->genericList = NULL;
tsdPtr->lastGenericPtr = NULL;
tsdPtr->cmList = NULL;
tsdPtr->lastCmPtr = NULL;
tsdPtr->restrictProc = NULL;
tsdPtr->restrictArg = NULL;
}

/*
*----------------------------------------------------------------------
*
Expand Down
1 change: 0 additions & 1 deletion generic/tkInt.h
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,6 @@ MODULE_SCOPE int TkSetGeometryContainer(Tcl_Interp *interp,
MODULE_SCOPE void TkFreeGeometryContainer(Tk_Window tkwin,
const char *name);

MODULE_SCOPE void TkEventInit(void);
MODULE_SCOPE void TkRegisterObjTypes(void);
MODULE_SCOPE int TkDeadAppObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);
Expand Down
1 change: 0 additions & 1 deletion generic/tkWindow.c
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,6 @@ TkCreateMainWindow(
mainPtr->interp = interp;
Tcl_InitHashTable(&mainPtr->nameTable, TCL_STRING_KEYS);
mainPtr->deletionEpoch = 0l;
TkEventInit();
TkBindInit(mainPtr);
TkFontPkgInit(mainPtr);
TkStylePkgInit(mainPtr);
Expand Down

0 comments on commit 61968d5

Please sign in to comment.