[gtk+] text: Constify field of GtkTextLineSegmentClass



commit b3adbbe5e7240b4ea497fd5cc9ff0d67a5b5a746
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Sat Oct 15 21:33:11 2016 +0100

    text: Constify field of GtkTextLineSegmentClass
    
    We only use it internally for statically allocated structures, with
    static strings, so there's no reason for it to be a `char*`.

 gtk/gtktextsegment.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtktextsegment.h b/gtk/gtktextsegment.h
index 5621bde..4ea125f 100644
--- a/gtk/gtktextsegment.h
+++ b/gtk/gtktextsegment.h
@@ -94,7 +94,7 @@ typedef void                (*GtkTextSegCheckFunc)      (GtkTextLineSegment *seg
                                                          GtkTextLine        *line);
 
 struct _GtkTextLineSegmentClass {
-  char *name;                           /* Name of this kind of segment. */
+  const char *name;                     /* Name of this kind of segment. */
   gboolean leftGravity;                 /* If a segment has zero size (e.g. a
                                          * mark or tag toggle), does it
                                          * attach to character to its left


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