[seahorse/object-list-bye: 4/4] util: Remove seahorse_util_string_lower()




commit 7b7e42137e1633784c4850e9b6c2edc195c3dd34
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Mon Feb 22 18:20:47 2021 +0100

    util: Remove seahorse_util_string_lower()
    
    These days, GLib provides `g_ascii_strdown()`

 libseahorse/seahorse-util.c | 13 -------------
 libseahorse/seahorse-util.h |  2 --
 pgp/seahorse-hkp-source.c   |  6 +++++-
 3 files changed, 5 insertions(+), 16 deletions(-)
---
diff --git a/libseahorse/seahorse-util.c b/libseahorse/seahorse-util.c
index 8a965343..c3cbc3b1 100644
--- a/libseahorse/seahorse-util.c
+++ b/libseahorse/seahorse-util.c
@@ -315,19 +315,6 @@ seahorse_util_objects_splice_by_place (GList *objects)
        return NULL;
 }
 
-/**
- * seahorse_util_string_lower:
- * @s: ASCII string to change
- *
- * The whole ASCII string will be lower cased.
- */
-void        
-seahorse_util_string_lower (gchar *s)
-{
-    for ( ; *s; s++)
-        *s = g_ascii_tolower (*s);
-}
-
 /**
  * seahorse_util_parse_version:
  *
diff --git a/libseahorse/seahorse-util.h b/libseahorse/seahorse-util.h
index 6eeff878..e0d45865 100644
--- a/libseahorse/seahorse-util.h
+++ b/libseahorse/seahorse-util.h
@@ -59,8 +59,6 @@ GList *     seahorse_util_objects_sort_by_place         (GList *objects);
 
 GList *     seahorse_util_objects_splice_by_place       (GList *objects);
 
-void        seahorse_util_string_lower        (gchar *s);
-
 SeahorseVersion seahorse_util_parse_version   (const char *version);
 
 guint       seahorse_ulong_hash    (gconstpointer v);
diff --git a/pgp/seahorse-hkp-source.c b/pgp/seahorse-hkp-source.c
index 9916bd63..d54480fe 100644
--- a/pgp/seahorse-hkp-source.c
+++ b/pgp/seahorse-hkp-source.c
@@ -486,8 +486,12 @@ hkp_message_propagate_error (SeahorseHKPSource *self,
     /* Make the body lower case, and no tags */
     text = g_strndup (message->response_body->data, message->response_body->length);
     if (text != NULL) {
+        char *text_lower;
+
         dehtmlize (text);
-        seahorse_util_string_lower (text);
+        text_lower = g_ascii_strdown (text, -1);
+        g_free (text);
+        text = text_lower;
     }
 
     if (text && strstr (text, "no keys"))


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