Module: wine Branch: stable Commit: f7888052448e06db5444171028f82a0b0eaa90b9 URL: https://source.winehq.org/git/wine.git/?a=commit;h=f7888052448e06db544417102...
Author: Piotr Caban piotr@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@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org (cherry picked from commit 688671763154c569b286567810d2e0ed3341dbac) Signed-off-by: Michael Stefaniuc mstefani@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); }