kernel32: Don't store the current codepage in the thread data.
This commit is contained in:
parent
0190edee7e
commit
9ff8da5499
|
@ -27,12 +27,11 @@ struct tagSYSLEVEL;
|
|||
|
||||
struct kernel_thread_data
|
||||
{
|
||||
UINT code_page; /* thread code page */
|
||||
WORD stack_sel; /* 16-bit stack selector */
|
||||
WORD htask16; /* Win16 task handle */
|
||||
DWORD sys_count[4]; /* syslevel mutex entry counters */
|
||||
struct tagSYSLEVEL *sys_mutex[4]; /* syslevel mutex pointers */
|
||||
void *pad[44]; /* change this if you add fields! */
|
||||
void *pad[45]; /* change this if you add fields! */
|
||||
};
|
||||
|
||||
static inline struct kernel_thread_data *kernel_get_thread_data(void)
|
||||
|
|
|
@ -222,7 +222,8 @@ static const union cptable *get_codepage_table( unsigned int codepage )
|
|||
case CP_UTF8:
|
||||
break;
|
||||
case CP_THREAD_ACP:
|
||||
if (!(codepage = kernel_get_thread_data()->code_page)) return ansi_cptable;
|
||||
if (NtCurrentTeb()->CurrentLocale == GetUserDefaultLCID()) return ansi_cptable;
|
||||
codepage = get_lcid_codepage( NtCurrentTeb()->CurrentLocale );
|
||||
/* fall through */
|
||||
default:
|
||||
if (codepage == ansi_cptable->info.codepage) return ansi_cptable;
|
||||
|
@ -2057,7 +2058,6 @@ BOOL WINAPI SetThreadLocale( LCID lcid )
|
|||
}
|
||||
|
||||
NtCurrentTeb()->CurrentLocale = lcid;
|
||||
kernel_get_thread_data()->code_page = get_lcid_codepage( lcid );
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue