msvcrt: Make locale and thread helper functions CDECL.
This prevent callers from having to save SSE registers to the stack. It is for instance the case in MSVCRT__towlower_l, which is called on every character by MSVCRT__wcsicmp_l. Signed-off-by: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
6b569a451f
commit
a24ad51e3f
|
@ -452,7 +452,7 @@ static inline void swap_pointers(void **p1, void **p2) {
|
|||
}
|
||||
|
||||
/* INTERNAL: returns pthreadlocinfo struct */
|
||||
MSVCRT_pthreadlocinfo get_locinfo(void) {
|
||||
MSVCRT_pthreadlocinfo CDECL get_locinfo(void) {
|
||||
thread_data_t *data = msvcrt_get_thread_data();
|
||||
|
||||
if(!data || !data->have_locale)
|
||||
|
@ -462,7 +462,7 @@ MSVCRT_pthreadlocinfo get_locinfo(void) {
|
|||
}
|
||||
|
||||
/* INTERNAL: returns pthreadlocinfo struct */
|
||||
MSVCRT_pthreadmbcinfo get_mbcinfo(void) {
|
||||
MSVCRT_pthreadmbcinfo CDECL get_mbcinfo(void) {
|
||||
thread_data_t *data = msvcrt_get_thread_data();
|
||||
|
||||
if(!data || !data->have_locale)
|
||||
|
|
|
@ -308,7 +308,7 @@ struct __thread_data {
|
|||
|
||||
typedef struct __thread_data thread_data_t;
|
||||
|
||||
extern thread_data_t *msvcrt_get_thread_data(void) DECLSPEC_HIDDEN;
|
||||
extern thread_data_t *CDECL msvcrt_get_thread_data(void) DECLSPEC_HIDDEN;
|
||||
|
||||
LCID MSVCRT_locale_to_LCID(const char*, unsigned short*, BOOL*) DECLSPEC_HIDDEN;
|
||||
extern MSVCRT__locale_t MSVCRT_locale DECLSPEC_HIDDEN;
|
||||
|
@ -1128,8 +1128,8 @@ int __cdecl MSVCRT__set_printf_count_output(int);
|
|||
#define MSVCRT__DISABLE_PER_THREAD_LOCALE 2
|
||||
|
||||
extern MSVCRT__locale_t MSVCRT_locale;
|
||||
MSVCRT_pthreadlocinfo get_locinfo(void) DECLSPEC_HIDDEN;
|
||||
MSVCRT_pthreadmbcinfo get_mbcinfo(void) DECLSPEC_HIDDEN;
|
||||
MSVCRT_pthreadlocinfo CDECL get_locinfo(void) DECLSPEC_HIDDEN;
|
||||
MSVCRT_pthreadmbcinfo CDECL get_mbcinfo(void) DECLSPEC_HIDDEN;
|
||||
void __cdecl MSVCRT__free_locale(MSVCRT__locale_t);
|
||||
void free_locinfo(MSVCRT_pthreadlocinfo) DECLSPEC_HIDDEN;
|
||||
void free_mbcinfo(MSVCRT_pthreadmbcinfo) DECLSPEC_HIDDEN;
|
||||
|
|
|
@ -35,7 +35,7 @@ typedef struct {
|
|||
*
|
||||
* Return the thread local storage structure.
|
||||
*/
|
||||
thread_data_t *msvcrt_get_thread_data(void)
|
||||
thread_data_t *CDECL msvcrt_get_thread_data(void)
|
||||
{
|
||||
thread_data_t *ptr;
|
||||
DWORD err = GetLastError(); /* need to preserve last error */
|
||||
|
|
Loading…
Reference in New Issue