[gspell] Prefix gspell_text_region functions() with an underscore



commit 9a15a93a6b968795cd60a11d5a5bcfcfcb12d1c0
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat Jan 23 17:08:58 2016 +0100

    Prefix gspell_text_region functions() with an underscore
    
    To fully mark the symbols as private.

 gspell/gspell-inline-checker-text-buffer.c |   42 ++++++++++++++--------------
 gspell/gspell-text-region.c                |   42 ++++++++++++++--------------
 gspell/gspell-text-region.h                |   28 +++++++++---------
 gspell/update-textregion.sh                |    2 +-
 4 files changed, 57 insertions(+), 57 deletions(-)
---
diff --git a/gspell/gspell-inline-checker-text-buffer.c b/gspell/gspell-inline-checker-text-buffer.c
index 9e34dc4..c2ca20e 100644
--- a/gspell/gspell-inline-checker-text-buffer.c
+++ b/gspell/gspell-inline-checker-text-buffer.c
@@ -227,16 +227,16 @@ is_text_region_empty (GspellTextRegion *region)
                return TRUE;
        }
 
-       gspell_text_region_get_iterator (region, &region_iter, 0);
+       _gspell_text_region_get_iterator (region, &region_iter, 0);
 
-       while (!gspell_text_region_iterator_is_end (&region_iter))
+       while (!_gspell_text_region_iterator_is_end (&region_iter))
        {
                GtkTextIter region_start;
                GtkTextIter region_end;
 
-               if (!gspell_text_region_iterator_get_subregion (&region_iter,
-                                                               &region_start,
-                                                               &region_end))
+               if (!_gspell_text_region_iterator_get_subregion (&region_iter,
+                                                                &region_start,
+                                                                &region_end))
                {
                        return TRUE;
                }
@@ -246,7 +246,7 @@ is_text_region_empty (GspellTextRegion *region)
                        return FALSE;
                }
 
-               gspell_text_region_iterator_next (&region_iter);
+               _gspell_text_region_iterator_next (&region_iter);
        }
 
        return TRUE;
@@ -268,41 +268,41 @@ check_visible_region_in_view (GspellInlineCheckerTextBuffer *spell,
 
        get_visible_region (view, &visible_start, &visible_end);
 
-       intersect = gspell_text_region_intersect (spell->scan_region,
-                                                &visible_start,
-                                                &visible_end);
+       intersect = _gspell_text_region_intersect (spell->scan_region,
+                                                  &visible_start,
+                                                  &visible_end);
 
        if (intersect == NULL)
        {
                return;
        }
 
-       gspell_text_region_get_iterator (intersect, &intersect_iter, 0);
+       _gspell_text_region_get_iterator (intersect, &intersect_iter, 0);
 
-       while (!gspell_text_region_iterator_is_end (&intersect_iter))
+       while (!_gspell_text_region_iterator_is_end (&intersect_iter))
        {
                GtkTextIter start;
                GtkTextIter end;
 
-               if (!gspell_text_region_iterator_get_subregion (&intersect_iter,
-                                                               &start,
-                                                               &end))
+               if (!_gspell_text_region_iterator_get_subregion (&intersect_iter,
+                                                                &start,
+                                                                &end))
                {
                        return;
                }
 
                check_subregion (spell, &start, &end);
 
-               gspell_text_region_subtract (spell->scan_region, &start, &end);
+               _gspell_text_region_subtract (spell->scan_region, &start, &end);
 
-               gspell_text_region_iterator_next (&intersect_iter);
+               _gspell_text_region_iterator_next (&intersect_iter);
        }
 
-       gspell_text_region_destroy (intersect);
+       _gspell_text_region_destroy (intersect);
 
        if (is_text_region_empty (spell->scan_region))
        {
-               gspell_text_region_destroy (spell->scan_region);
+               _gspell_text_region_destroy (spell->scan_region);
                spell->scan_region = NULL;
        }
 }
@@ -369,10 +369,10 @@ add_subregion_to_scan (GspellInlineCheckerTextBuffer *spell,
 {
        if (spell->scan_region == NULL)
        {
-               spell->scan_region = gspell_text_region_new (spell->buffer);
+               spell->scan_region = _gspell_text_region_new (spell->buffer);
        }
 
-       gspell_text_region_add (spell->scan_region, start, end);
+       _gspell_text_region_add (spell->scan_region, start, end);
 }
 
 static void
@@ -1082,7 +1082,7 @@ _gspell_inline_checker_text_buffer_dispose (GObject *object)
 
        if (spell->scan_region != NULL)
        {
-               gspell_text_region_destroy (spell->scan_region);
+               _gspell_text_region_destroy (spell->scan_region);
                spell->scan_region = NULL;
        }
 
diff --git a/gspell/gspell-text-region.c b/gspell/gspell-text-region.c
index 883e647..78b12c6 100644
--- a/gspell/gspell-text-region.c
+++ b/gspell/gspell-text-region.c
@@ -112,7 +112,7 @@ find_nearest_subregion (GspellTextRegion     *region,
    ---------------------------------------------------------------------- */
 
 GspellTextRegion *
-gspell_text_region_new (GtkTextBuffer *buffer)
+_gspell_text_region_new (GtkTextBuffer *buffer)
 {
        GspellTextRegion *region;
 
@@ -131,7 +131,7 @@ gspell_text_region_new (GtkTextBuffer *buffer)
 }
 
 void
-gspell_text_region_destroy (GspellTextRegion *region)
+_gspell_text_region_destroy (GspellTextRegion *region)
 {
        g_return_if_fail (region != NULL);
 
@@ -158,7 +158,7 @@ gspell_text_region_destroy (GspellTextRegion *region)
 }
 
 GtkTextBuffer *
-gspell_text_region_get_buffer (GspellTextRegion *region)
+_gspell_text_region_get_buffer (GspellTextRegion *region)
 {
        g_return_val_if_fail (region != NULL, NULL);
 
@@ -166,7 +166,7 @@ gspell_text_region_get_buffer (GspellTextRegion *region)
 }
 
 static void
-gspell_text_region_clear_zero_length_subregions (GspellTextRegion *region)
+_gspell_text_region_clear_zero_length_subregions (GspellTextRegion *region)
 {
        GtkTextIter start, end;
        GList *node;
@@ -195,7 +195,7 @@ gspell_text_region_clear_zero_length_subregions (GspellTextRegion *region)
 }
 
 void
-gspell_text_region_add (GspellTextRegion     *region,
+_gspell_text_region_add (GspellTextRegion     *region,
                     const GtkTextIter *_start,
                     const GtkTextIter *_end)
 {
@@ -213,7 +213,7 @@ gspell_text_region_add (GspellTextRegion     *region,
        end = *_end;
 
        DEBUG (g_print ("---\n"));
-       DEBUG (gspell_text_region_debug_print (region));
+       DEBUG (_gspell_text_region_debug_print (region));
        DEBUG (g_message ("region_add (%d, %d)",
                          gtk_text_iter_get_offset (&start),
                          gtk_text_iter_get_offset (&end)));
@@ -281,11 +281,11 @@ gspell_text_region_add (GspellTextRegion     *region,
 
        ++region->time_stamp;
 
-       DEBUG (gspell_text_region_debug_print (region));
+       DEBUG (_gspell_text_region_debug_print (region));
 }
 
 void
-gspell_text_region_subtract (GspellTextRegion     *region,
+_gspell_text_region_subtract (GspellTextRegion     *region,
                          const GtkTextIter *_start,
                          const GtkTextIter *_end)
 {
@@ -307,7 +307,7 @@ gspell_text_region_subtract (GspellTextRegion     *region,
        end = *_end;
 
        DEBUG (g_print ("---\n"));
-       DEBUG (gspell_text_region_debug_print (region));
+       DEBUG (_gspell_text_region_debug_print (region));
        DEBUG (g_message ("region_substract (%d, %d)",
                          gtk_text_iter_get_offset (&start),
                          gtk_text_iter_get_offset (&end)));
@@ -406,16 +406,16 @@ gspell_text_region_subtract (GspellTextRegion     *region,
 
        ++region->time_stamp;
 
-       DEBUG (gspell_text_region_debug_print (region));
+       DEBUG (_gspell_text_region_debug_print (region));
 
        /* now get rid of empty subregions */
-       gspell_text_region_clear_zero_length_subregions (region);
+       _gspell_text_region_clear_zero_length_subregions (region);
 
-       DEBUG (gspell_text_region_debug_print (region));
+       DEBUG (_gspell_text_region_debug_print (region));
 }
 
 gint
-gspell_text_region_subregions (GspellTextRegion *region)
+_gspell_text_region_subregions (GspellTextRegion *region)
 {
        g_return_val_if_fail (region != NULL, 0);
 
@@ -423,7 +423,7 @@ gspell_text_region_subregions (GspellTextRegion *region)
 }
 
 gboolean
-gspell_text_region_nth_subregion (GspellTextRegion *region,
+_gspell_text_region_nth_subregion (GspellTextRegion *region,
                               guint          subregion,
                               GtkTextIter   *start,
                               GtkTextIter   *end)
@@ -450,7 +450,7 @@ gspell_text_region_nth_subregion (GspellTextRegion *region,
 }
 
 GspellTextRegion *
-gspell_text_region_intersect (GspellTextRegion     *region,
+_gspell_text_region_intersect (GspellTextRegion     *region,
                           const GtkTextIter *_start,
                           const GtkTextIter *_end)
 {
@@ -481,7 +481,7 @@ gspell_text_region_intersect (GspellTextRegion     *region,
        if (start_node == NULL || end_node == NULL || end_node == start_node->prev)
                return NULL;
 
-       new_region = gspell_text_region_new (region->buffer);
+       new_region = _gspell_text_region_new (region->buffer);
        done = FALSE;
 
        sr = start_node->data;
@@ -574,7 +574,7 @@ check_iterator (GspellTextRegionIteratorReal *real)
 }
 
 void
-gspell_text_region_get_iterator (GspellTextRegion         *region,
+_gspell_text_region_get_iterator (GspellTextRegion         *region,
                               GspellTextRegionIterator *iter,
                               guint                  start)
 {
@@ -593,7 +593,7 @@ gspell_text_region_get_iterator (GspellTextRegion         *region,
 }
 
 gboolean
-gspell_text_region_iterator_is_end (GspellTextRegionIterator *iter)
+_gspell_text_region_iterator_is_end (GspellTextRegionIterator *iter)
 {
        GspellTextRegionIteratorReal *real;
 
@@ -606,7 +606,7 @@ gspell_text_region_iterator_is_end (GspellTextRegionIterator *iter)
 }
 
 gboolean
-gspell_text_region_iterator_next (GspellTextRegionIterator *iter)
+_gspell_text_region_iterator_next (GspellTextRegionIterator *iter)
 {
        GspellTextRegionIteratorReal *real;
 
@@ -627,7 +627,7 @@ gspell_text_region_iterator_next (GspellTextRegionIterator *iter)
 }
 
 gboolean
-gspell_text_region_iterator_get_subregion (GspellTextRegionIterator *iter,
+_gspell_text_region_iterator_get_subregion (GspellTextRegionIterator *iter,
                                        GtkTextIter           *start,
                                        GtkTextIter           *end)
 {
@@ -662,7 +662,7 @@ gspell_text_region_iterator_get_subregion (GspellTextRegionIterator *iter,
 }
 
 void
-gspell_text_region_debug_print (GspellTextRegion *region)
+_gspell_text_region_debug_print (GspellTextRegion *region)
 {
        GList *l;
 
diff --git a/gspell/gspell-text-region.h b/gspell/gspell-text-region.h
index c8939b9..37da152 100644
--- a/gspell/gspell-text-region.h
+++ b/gspell/gspell-text-region.h
@@ -33,7 +33,7 @@ typedef struct _GspellTextRegionIterator      GspellTextRegionIterator;
 
 struct _GspellTextRegionIterator {
        /* GspellTextRegionIterator is an opaque datatype; ignore all these fields.
-        * Initialize the iter with gspell_text_region_get_iterator
+        * Initialize the iter with _gspell_text_region_get_iterator
         * function
         */
        /*< private >*/
@@ -43,57 +43,57 @@ struct _GspellTextRegionIterator {
 };
 
 G_GNUC_INTERNAL
-GspellTextRegion *gspell_text_region_new                          (GtkTextBuffer *buffer);
+GspellTextRegion *_gspell_text_region_new                          (GtkTextBuffer *buffer);
 
 G_GNUC_INTERNAL
-void           gspell_text_region_destroy                      (GspellTextRegion *region);
+void           _gspell_text_region_destroy                      (GspellTextRegion *region);
 
 G_GNUC_INTERNAL
-GtkTextBuffer *gspell_text_region_get_buffer                   (GspellTextRegion *region);
+GtkTextBuffer *_gspell_text_region_get_buffer                   (GspellTextRegion *region);
 
 G_GNUC_INTERNAL
-void           gspell_text_region_add                          (GspellTextRegion     *region,
+void           _gspell_text_region_add                          (GspellTextRegion     *region,
                                                             const GtkTextIter *_start,
                                                             const GtkTextIter *_end);
 
 G_GNUC_INTERNAL
-void           gspell_text_region_subtract                     (GspellTextRegion     *region,
+void           _gspell_text_region_subtract                     (GspellTextRegion     *region,
                                                             const GtkTextIter *_start,
                                                             const GtkTextIter *_end);
 
 G_GNUC_INTERNAL
-gint           gspell_text_region_subregions                   (GspellTextRegion *region);
+gint           _gspell_text_region_subregions                   (GspellTextRegion *region);
 
 G_GNUC_INTERNAL
-gboolean       gspell_text_region_nth_subregion                (GspellTextRegion *region,
+gboolean       _gspell_text_region_nth_subregion                (GspellTextRegion *region,
                                                             guint          subregion,
                                                             GtkTextIter   *start,
                                                             GtkTextIter   *end);
 
 G_GNUC_INTERNAL
-GspellTextRegion *gspell_text_region_intersect                    (GspellTextRegion     *region,
+GspellTextRegion *_gspell_text_region_intersect                    (GspellTextRegion     *region,
                                                             const GtkTextIter *_start,
                                                             const GtkTextIter *_end);
 
 G_GNUC_INTERNAL
-void           gspell_text_region_get_iterator                 (GspellTextRegion         *region,
+void           _gspell_text_region_get_iterator                 (GspellTextRegion         *region,
                                                              GspellTextRegionIterator *iter,
                                                              guint                  start);
 
 G_GNUC_INTERNAL
-gboolean       gspell_text_region_iterator_is_end              (GspellTextRegionIterator *iter);
+gboolean       _gspell_text_region_iterator_is_end              (GspellTextRegionIterator *iter);
 
 /* Returns FALSE if iterator is the end iterator */
 G_GNUC_INTERNAL
-gboolean       gspell_text_region_iterator_next                    (GspellTextRegionIterator *iter);
+gboolean       _gspell_text_region_iterator_next                   (GspellTextRegionIterator *iter);
 
 G_GNUC_INTERNAL
-gboolean       gspell_text_region_iterator_get_subregion       (GspellTextRegionIterator *iter,
+gboolean       _gspell_text_region_iterator_get_subregion       (GspellTextRegionIterator *iter,
                                                             GtkTextIter           *start,
                                                             GtkTextIter           *end);
 
 G_GNUC_INTERNAL
-void           gspell_text_region_debug_print                  (GspellTextRegion *region);
+void           _gspell_text_region_debug_print                  (GspellTextRegion *region);
 
 G_END_DECLS
 
diff --git a/gspell/update-textregion.sh b/gspell/update-textregion.sh
index d46089e..87a3e3a 100755
--- a/gspell/update-textregion.sh
+++ b/gspell/update-textregion.sh
@@ -23,7 +23,7 @@ update_file () {
         -e '/gtksourcetypes-private.h/d' \
         -e 's/GTK_SOURCE_INTERNAL/G_GNUC_INTERNAL/g' \
         -e 's/gtktextregion/gspell-text-region/g' \
-        -e 's/gtk_text_region/gspell_text_region/g' \
+        -e 's/gtk_text_region/_gspell_text_region/g' \
         -e 's/GtkTextRegion/GspellTextRegion/g' \
         -e 's/GTK_TEXT_REGION/GSPELL_TEXT_REGION/g' >> "${_dest}"
 }


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