Piotr Caban : msvcrt: Optimize toupper function when locale was never changed.
Alexandre Julliard
julliard at winehq.org
Wed May 15 14:32:19 CDT 2019
Module: wine
Branch: stable
Commit: f7888052448e06db5444171028f82a0b0eaa90b9
URL: https://source.winehq.org/git/wine.git/?a=commit;h=f7888052448e06db5444171028f82a0b0eaa90b9
Author: Piotr Caban <piotr at codeweavers.com>
Date: Wed Jan 23 11:59:11 2019 +0100
msvcrt: Optimize toupper function when locale was never changed.
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit 688671763154c569b286567810d2e0ed3341dbac)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
dlls/msvcrt/ctype.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/msvcrt/ctype.c b/dlls/msvcrt/ctype.c
index 17b12e2..3b037aa 100644
--- a/dlls/msvcrt/ctype.c
+++ b/dlls/msvcrt/ctype.c
@@ -398,6 +398,8 @@ int CDECL MSVCRT__toupper_l(int c, MSVCRT__locale_t locale)
*/
int CDECL MSVCRT_toupper(int c)
{
+ if(initial_locale)
+ return c>='a' && c<='z' ? c-'a'+'A' : c;
return MSVCRT__toupper_l(c, NULL);
}
More information about the wine-cvs
mailing list