Piotr Caban : msvcrt: Optimize toupper function when locale was never changed.

Alexandre Julliard julliard at winehq.org
Wed Jan 23 17:11:34 CST 2019


Module: wine
Branch: master
Commit: 688671763154c569b286567810d2e0ed3341dbac
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=688671763154c569b286567810d2e0ed3341dbac

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>

---

 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