Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
e926c62c
Commit
e926c62c
authored
Feb 24, 2009
by
Rob Shearman
Committed by
Alexandre Julliard
Feb 24, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imm32: Lazily allocated thread-local data.
parent
f970db94
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
12 deletions
+7
-12
imm.c
dlls/imm32/imm.c
+7
-12
No files found.
dlls/imm32/imm.c
View file @
e926c62c
...
...
@@ -220,19 +220,15 @@ static DWORD convert_candidatelist_AtoW(
static
IMMThreadData
*
IMM_GetThreadData
(
void
)
{
return
TlsGetValue
(
tlsIndex
);
}
static
BOOL
IMM_InitThreadData
(
void
)
{
IMMThreadData
*
data
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
IMMThreadData
*
data
=
TlsGetValue
(
tlsIndex
);
if
(
!
data
)
{
data
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IMMThreadData
));
if
(
!
data
)
return
FALSE
;
TlsSetValue
(
tlsIndex
,
data
);
TRACE
(
"Thread Data Created
\n
"
);
return
TRUE
;
}
return
data
;
}
static
void
IMM_FreeThreadData
(
void
)
...
...
@@ -384,11 +380,10 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpReserved)
case
DLL_PROCESS_ATTACH
:
IMM_RegisterMessages
();
tlsIndex
=
TlsAlloc
();
if
(
tlsIndex
==
TLS_OUT_OF_INDEXES
||
!
IMM_InitThreadData
()
)
if
(
tlsIndex
==
TLS_OUT_OF_INDEXES
)
return
FALSE
;
break
;
case
DLL_THREAD_ATTACH
:
IMM_InitThreadData
();
break
;
case
DLL_THREAD_DETACH
:
IMM_FreeThreadData
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment