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
2 parents 37b89a8 + 61968d5 commit ca0d153
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 36 deletions.
34 changes: 0 additions & 34 deletions generic/tkEvent.c
Original file line number Diff line number Diff line change
Expand Up @@ -990,40 +990,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 @@ -1280,7 +1280,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 Tcl_ObjCmdProc TkDeadAppObjCmd;
MODULE_SCOPE int TkCanvasGetCoordObj(Tcl_Interp *interp,
Expand Down
1 change: 0 additions & 1 deletion generic/tkWindow.c
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,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 ca0d153

Please sign in to comment.