[gjs/locale-agnostic-camel-properties] Revert "jsapi-util-strings: Ignore locale to compute the upper case of a char"



commit c232a96b314cb4c99b6f23d1fa893b4204de50a8
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Thu Apr 28 21:47:47 2022 +0200

    Revert "jsapi-util-strings: Ignore locale to compute the upper case of a char"
    
    This reverts commit 753f70ae577d1a31a6eb1a4413e2a8c626e75b1c.

 gjs/gjs_pch.hh            | 1 +
 gjs/jsapi-util-string.cpp | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/gjs/gjs_pch.hh b/gjs/gjs_pch.hh
index 6f1b0b4fb..46bea8a9b 100644
--- a/gjs/gjs_pch.hh
+++ b/gjs/gjs_pch.hh
@@ -28,6 +28,7 @@
 #include <vector>
 
 #include <assert.h>
+#include <ctype.h>
 #include <errno.h>
 #include <ffi.h>
 #include <gio/gio.h>
diff --git a/gjs/jsapi-util-string.cpp b/gjs/jsapi-util-string.cpp
index a39a0c055..c78069a83 100644
--- a/gjs/jsapi-util-string.cpp
+++ b/gjs/jsapi-util-string.cpp
@@ -4,6 +4,7 @@
 
 #include <config.h>
 
+#include <ctype.h>  // for toupper
 #include <stdint.h>
 #include <string.h>     // for size_t, strlen
 #include <sys/types.h>  // for ssize_t
@@ -58,7 +59,7 @@ GjsAutoChar gjs_hyphen_to_camel(const char* str) {
         if (*input_iter == '-') {
             uppercase_next = true;
         } else if (uppercase_next) {
-            *output_iter++ = g_ascii_toupper(*input_iter);
+            *output_iter++ = toupper(*input_iter);
             uppercase_next = false;
         } else {
             *output_iter++ = *input_iter;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]