diff options
author | lfb <lfb> | 1999-03-09 01:36:06 (GMT) |
---|---|---|
committer | lfb <lfb> | 1999-03-09 01:36:06 (GMT) |
commit | 8747f752cb1d54d0854a25b064d685bd68e839c1 (patch) | |
tree | e54955be8813bc6874db9a52e707845fb2b73d3e /win | |
parent | f1d8bd42b49e8430b3f9734e1e80cfd781c5ebf7 (diff) | |
download | tk-8747f752cb1d54d0854a25b064d685bd68e839c1.zip tk-8747f752cb1d54d0854a25b064d685bd68e839c1.tar.gz tk-8747f752cb1d54d0854a25b064d685bd68e839c1.tar.bz2 |
Added TkpThreadInit function for performing thread-specific
initialization of Menu module. Only does real work on Windows.
Diffstat (limited to 'win')
-rw-r--r-- | win/tkWinMenu.c | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c index 9cdfe72..8b61ad4 100644 --- a/win/tkWinMenu.c +++ b/win/tkWinMenu.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinMenu.c,v 1.1.4.9 1999/02/11 04:13:51 stanton Exp $ + * RCS: @(#) $Id: tkWinMenu.c,v 1.1.4.10 1999/03/09 01:36:06 lfb Exp $ */ #define OEMRESOURCE @@ -2773,14 +2773,13 @@ SetDefaults( * * TkpMenuInit -- * - * Sets up the hash tables and the variables used by the menu package. + * Sets up the process-wide variables used by the menu package. * * Results: * None. * * Side effects: - * lastMenuID gets initialized, and the parent hash and the command hash - * are allocated. + * lastMenuID gets initialized. * *---------------------------------------------------------------------- */ @@ -2792,8 +2791,6 @@ TkpMenuInit() ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); - Tcl_InitHashTable(&tsdPtr->winMenuTable, TCL_ONE_WORD_KEYS); - Tcl_InitHashTable(&tsdPtr->commandTable, TCL_ONE_WORD_KEYS); wndClass.style = CS_OWNDC; wndClass.lpfnWndProc = TkWinMenuProc; wndClass.cbClsExtra = 0; @@ -2812,3 +2809,29 @@ TkpMenuInit() Tcl_CreateExitHandler(MenuExitHandler, (ClientData) NULL); SetDefaults(1); } + +/* + *---------------------------------------------------------------------- + * + * TkpMenuThreadInit -- + * + * Sets up the thread-local hash tables used by the menu module. + * + * Results: + * None. + * + * Side effects: + * Hash tables winMenuTable and commandTable are initialized. + * + *---------------------------------------------------------------------- + */ + +void +TkpMenuThreadInit() +{ + ThreadSpecificData *tsdPtr = (ThreadSpecificData *) + Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); + + Tcl_InitHashTable(&tsdPtr->winMenuTable, TCL_ONE_WORD_KEYS); + Tcl_InitHashTable(&tsdPtr->commandTable, TCL_ONE_WORD_KEYS); +} |