[gtk/wip/otte/filterlistmodel: 12/13] bitset: Fix typo: gtk_bitset_slice() => gtk_bitset_splice()



commit 3162e25671f2838fddc52671435cdefe654b350a
Author: Benjamin Otte <otte redhat com>
Date:   Mon Jul 6 03:41:12 2020 +0200

    bitset: Fix typo: gtk_bitset_slice() => gtk_bitset_splice()

 docs/reference/gtk/gtk4-sections.txt |  2 +-
 gtk/gtkbitset.c                      | 10 +++++-----
 gtk/gtkbitset.h                      |  2 +-
 gtk/gtkfilterlistmodel.c             |  4 ++--
 gtk/gtkmultiselection.c              |  2 +-
 testsuite/gtk/bitset.c               |  6 +++---
 6 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index f3a303e5f0..c3091c1b01 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -375,7 +375,7 @@ gtk_bitset_subtract
 gtk_bitset_difference
 gtk_bitset_shift_left
 gtk_bitset_shift_right
-gtk_bitset_slice
+gtk_bitset_splice
 <SUBSECTION>
 GtkBitsetIter
 gtk_bitset_iter_init_first
diff --git a/gtk/gtkbitset.c b/gtk/gtkbitset.c
index 1ee80500c9..6f29e59757 100644
--- a/gtk/gtkbitset.c
+++ b/gtk/gtkbitset.c
@@ -707,7 +707,7 @@ gtk_bitset_shift_right (GtkBitset *self,
 }
 
 /**
- * gtk_bitset_slice:
+ * gtk_bitset_splice:
  * @self: a #GtkBitset
  * @position: position at which to slice
  * @removed: number of values to remove
@@ -725,10 +725,10 @@ gtk_bitset_shift_right (GtkBitset *self,
  * up space that can then be filled.
  **/
 void
-gtk_bitset_slice (GtkBitset *self,
-                  guint      position,
-                  guint      removed,
-                  guint      added)
+gtk_bitset_splice (GtkBitset *self,
+                   guint      position,
+                   guint      removed,
+                   guint      added)
 {
   g_return_if_fail (self != NULL);
   /* overflow */
diff --git a/gtk/gtkbitset.h b/gtk/gtkbitset.h
index be0ca58f3b..19528ef55e 100644
--- a/gtk/gtkbitset.h
+++ b/gtk/gtkbitset.h
@@ -125,7 +125,7 @@ GDK_AVAILABLE_IN_ALL
 void                    gtk_bitset_shift_right                  (GtkBitset              *self,
                                                                  guint                   amount);
 GDK_AVAILABLE_IN_ALL
-void                    gtk_bitset_slice                        (GtkBitset              *self,
+void                    gtk_bitset_splice                       (GtkBitset              *self,
                                                                  guint                   position,
                                                                  guint                   removed,
                                                                  guint                   added);
diff --git a/gtk/gtkfilterlistmodel.c b/gtk/gtkfilterlistmodel.c
index 3f8aedb0b3..bd486bf9bf 100644
--- a/gtk/gtkfilterlistmodel.c
+++ b/gtk/gtkfilterlistmodel.c
@@ -302,9 +302,9 @@ gtk_filter_list_model_items_changed_cb (GListModel         *model,
   else
     filter_removed = 0;
 
-  gtk_bitset_slice (self->matches, position, removed, added);
+  gtk_bitset_splice (self->matches, position, removed, added);
   if (self->pending)
-    gtk_bitset_slice (self->pending, position, removed, added);
+    gtk_bitset_splice (self->pending, position, removed, added);
 
   if (added > 0)
     {
diff --git a/gtk/gtkmultiselection.c b/gtk/gtkmultiselection.c
index 4dd93b5234..6c754f77a8 100644
--- a/gtk/gtkmultiselection.c
+++ b/gtk/gtkmultiselection.c
@@ -222,7 +222,7 @@ gtk_multi_selection_items_changed_cb (GListModel        *model,
   GHashTable *pending = NULL;
   guint i;
 
-  gtk_bitset_slice (self->selected, position, removed, added);
+  gtk_bitset_splice (self->selected, position, removed, added);
 
   g_hash_table_iter_init (&iter, self->items);
   while (g_hash_table_iter_next (&iter, &item, &pos_pointer))
diff --git a/testsuite/gtk/bitset.c b/testsuite/gtk/bitset.c
index 8a84648324..110dc1401e 100644
--- a/testsuite/gtk/bitset.c
+++ b/testsuite/gtk/bitset.c
@@ -424,13 +424,13 @@ test_slice (void)
 
   gtk_bitset_add_range (set, 10, 30);
 
-  gtk_bitset_slice (set, 20, 10, 20);
+  gtk_bitset_splice (set, 20, 10, 20);
 
   for (i = 0; i < 60; i++)
     g_assert_cmpint (gtk_bitset_contains (set, i), ==, (i >= 10 && i < 20) ||
                                                        (i >= 40 && i < 50));
 
-  gtk_bitset_slice (set, 25, 10, 0);
+  gtk_bitset_splice (set, 25, 10, 0);
 
   for (i = 0; i < 60; i++)
     g_assert_cmpint (gtk_bitset_contains (set, i), ==, (i >= 10 && i < 20) ||
@@ -549,7 +549,7 @@ test_splice_overflow (void)
   GtkBitset *set, *compare;
 
   set = gtk_bitset_new_range (3, 1);
-  gtk_bitset_slice (set, 0, 0, 13);
+  gtk_bitset_splice (set, 0, 0, 13);
 
   compare = gtk_bitset_new_range (16, 1);
   g_assert_true (gtk_bitset_equals (set, compare));


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