[pango/glyph-string-const-char] Add a few missing const




commit 2876df499fe9e153571efc3d8a9c36e325c872f6
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Aug 17 15:05:03 2021 -0400

    Add a few missing const
    
    We should only pass char * when we actually
    modify the string. Everything else is const char *.

 pango/glyphstring.c | 24 ++++++++++++------------
 pango/pango-glyph.h | 24 ++++++++++++------------
 2 files changed, 24 insertions(+), 24 deletions(-)
---
diff --git a/pango/glyphstring.c b/pango/glyphstring.c
index 87c8a069..e937549a 100644
--- a/pango/glyphstring.c
+++ b/pango/glyphstring.c
@@ -373,12 +373,12 @@ pango_glyph_string_get_logical_widths (PangoGlyphString *glyphs,
  */
 void
 pango_glyph_string_index_to_x (PangoGlyphString *glyphs,
-                              char             *text,
-                              int               length,
-                              PangoAnalysis    *analysis,
-                              int               index,
-                              gboolean          trailing,
-                              int              *x_pos)
+                               const char       *text,
+                               int               length,
+                               PangoAnalysis    *analysis,
+                               int               index,
+                               gboolean          trailing,
+                               int              *x_pos)
 {
   int i;
   int start_xpos = 0;
@@ -504,12 +504,12 @@ pango_glyph_string_index_to_x (PangoGlyphString *glyphs,
  */
 void
 pango_glyph_string_x_to_index (PangoGlyphString *glyphs,
-                              char             *text,
-                              int               length,
-                              PangoAnalysis    *analysis,
-                              int               x_pos,
-                              int              *index,
-                              gboolean         *trailing)
+                               const char       *text,
+                               int               length,
+                               PangoAnalysis    *analysis,
+                               int               x_pos,
+                               int              *index,
+                               gboolean         *trailing)
 {
   int i;
   int start_xpos = 0;
diff --git a/pango/pango-glyph.h b/pango/pango-glyph.h
index 3674d6b7..67302bfd 100644
--- a/pango/pango-glyph.h
+++ b/pango/pango-glyph.h
@@ -167,20 +167,20 @@ void pango_glyph_string_get_logical_widths (PangoGlyphString *glyphs,
 
 PANGO_AVAILABLE_IN_ALL
 void pango_glyph_string_index_to_x (PangoGlyphString *glyphs,
-                                   char             *text,
-                                   int               length,
-                                   PangoAnalysis    *analysis,
-                                   int               index_,
-                                   gboolean          trailing,
-                                   int              *x_pos);
+                                    const char       *text,
+                                    int               length,
+                                    PangoAnalysis    *analysis,
+                                    int               index_,
+                                    gboolean          trailing,
+                                    int              *x_pos);
 PANGO_AVAILABLE_IN_ALL
 void pango_glyph_string_x_to_index (PangoGlyphString *glyphs,
-                                   char             *text,
-                                   int               length,
-                                   PangoAnalysis    *analysis,
-                                   int               x_pos,
-                                   int              *index_,
-                                   int              *trailing);
+                                    const char       *text,
+                                    int               length,
+                                    PangoAnalysis    *analysis,
+                                    int               x_pos,
+                                    int              *index_,
+                                    int              *trailing);
 
 /* Turn a string of characters into a string of glyphs
  */


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