From 6a1d710752a012cb3e2f8646841a583b7d00d87c Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 9 Feb 2006 17:14:08 +0000 Subject: =?UTF-8?q?Bug=20314548=20=E2=80=93=20pango=5Fshape()=20is=20missi?= =?UTF-8?q?ng=20const=20correctness=20Patch=20from?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2006-02-09 Behdad Esfahbod Bug 314548 – pango_shape() is missing const correctness Patch from Antoine Dopffer. * modules/arabic/arabic-fc.c, modules/basic/basic-fc.c, modules/basic/basic-x.c, modules/hangul/hangul-fc.c, modules/hebrew/hebrew-fc.c, modules/indic/indic-fc.c, modules/khmer/khmer-fc.c, modules/syriac/syriac-fc.c, modules/thai/thai-shaper.c, modules/thai/thai-shaper.h, modules/tibetan/tibetan-fc.c, pango/pango-context.c, pango/pango-engine-private.h, pango/pango-engine.c, pango/pango-engine.h, pango/pango-glyph.h pango/pango-layout.c, pango/shape.c: Make PangoAnalysis *analysis const in all shaper interfaces. --- ChangeLog | 16 ++++++++++++++++ modules/arabic/arabic-fc.c | 4 ++-- modules/basic/basic-fc.c | 4 ++-- modules/basic/basic-x.c | 2 +- modules/hangul/hangul-fc.c | 2 +- modules/hebrew/hebrew-fc.c | 4 ++-- modules/indic/indic-fc.c | 2 +- modules/khmer/khmer-fc.c | 2 +- modules/syriac/syriac-fc.c | 4 ++-- modules/thai/thai-shaper.c | 2 +- modules/thai/thai-shaper.h | 2 +- modules/tibetan/tibetan-fc.c | 2 +- pango/pango-context.c | 2 -- pango/pango-engine-private.h | 2 +- pango/pango-engine.c | 4 ++-- pango/pango-engine.h | 2 +- pango/pango-glyph.h | 2 +- pango/pango-layout.c | 1 - pango/shape.c | 2 +- 19 files changed, 37 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index bf35f804..8058694f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2006-02-09 Behdad Esfahbod + + Bug 314548 – pango_shape() is missing const correctness + Patch from Antoine Dopffer. + + * modules/arabic/arabic-fc.c, modules/basic/basic-fc.c, + modules/basic/basic-x.c, modules/hangul/hangul-fc.c, + modules/hebrew/hebrew-fc.c, modules/indic/indic-fc.c, + modules/khmer/khmer-fc.c, modules/syriac/syriac-fc.c, + modules/thai/thai-shaper.c, modules/thai/thai-shaper.h, + modules/tibetan/tibetan-fc.c, pango/pango-context.c, + pango/pango-engine-private.h, pango/pango-engine.c, + pango/pango-engine.h, pango/pango-glyph.h pango/pango-layout.c, + pango/shape.c: Make PangoAnalysis *analysis const in all shaper + interfaces. + 2006-02-08 Anders Carlsson * configure.in: Add basic-atsui to basic_modules diff --git a/modules/arabic/arabic-fc.c b/modules/arabic/arabic-fc.c index 50a0eb68..0b3faefa 100644 --- a/modules/arabic/arabic-fc.c +++ b/modules/arabic/arabic-fc.c @@ -176,7 +176,7 @@ fallback_shape (PangoEngineShape *engine, PangoFont *font, const char *text, gint length, - PangoAnalysis *analysis, + const PangoAnalysis *analysis, PangoGlyphString *glyphs) { PangoFcFont *fc_font = PANGO_FC_FONT (font); @@ -253,7 +253,7 @@ arabic_engine_shape (PangoEngineShape *engine, PangoFont *font, const char *text, gint length, - PangoAnalysis *analysis, + const PangoAnalysis *analysis, PangoGlyphString *glyphs) { PangoFcFont *fc_font; diff --git a/modules/basic/basic-fc.c b/modules/basic/basic-fc.c index 80694bad..dc77ef00 100644 --- a/modules/basic/basic-fc.c +++ b/modules/basic/basic-fc.c @@ -130,7 +130,7 @@ fallback_shape (PangoEngineShape *engine, PangoFont *font, const char *text, gint length, - PangoAnalysis *analysis, + const PangoAnalysis *analysis, PangoGlyphString *glyphs) { PangoFcFont *fc_font = PANGO_FC_FONT (font); @@ -324,7 +324,7 @@ basic_engine_shape (PangoEngineShape *engine, PangoFont *font, const char *text, gint length, - PangoAnalysis *analysis, + const PangoAnalysis *analysis, PangoGlyphString *glyphs) { PangoFcFont *fc_font; diff --git a/modules/basic/basic-x.c b/modules/basic/basic-x.c index 451ea6da..1f23291c 100644 --- a/modules/basic/basic-x.c +++ b/modules/basic/basic-x.c @@ -560,7 +560,7 @@ basic_engine_shape (PangoEngineShape *engine, PangoFont *font, const char *text, gint length, - PangoAnalysis *analysis, + const PangoAnalysis *analysis, PangoGlyphString *glyphs) { int n_chars; diff --git a/modules/hangul/hangul-fc.c b/modules/hangul/hangul-fc.c index 7c169a9d..39e0d5ba 100644 --- a/modules/hangul/hangul-fc.c +++ b/modules/hangul/hangul-fc.c @@ -305,7 +305,7 @@ hangul_engine_shape (PangoEngineShape *engine, PangoFont *font, const char *text, gint length, - PangoAnalysis *analysis, + const PangoAnalysis *analysis, PangoGlyphString *glyphs) { int n_chars, n_glyphs; diff --git a/modules/hebrew/hebrew-fc.c b/modules/hebrew/hebrew-fc.c index 454e00ca..dcb45b40 100644 --- a/modules/hebrew/hebrew-fc.c +++ b/modules/hebrew/hebrew-fc.c @@ -230,7 +230,7 @@ fallback_shape (PangoEngineShape *engine, PangoFont *font, const char *text, gint length, - PangoAnalysis *analysis, + const PangoAnalysis *analysis, PangoGlyphString *glyphs) { const char *p; @@ -292,7 +292,7 @@ hebrew_engine_shape (PangoEngineShape *engine, PangoFont *font, const char *text, gint length, - PangoAnalysis *analysis, + const PangoAnalysis *analysis, PangoGlyphString *glyphs) { PangoFcFont *fc_font; diff --git a/modules/indic/indic-fc.c b/modules/indic/indic-fc.c index 021d3ef8..3011a66a 100644 --- a/modules/indic/indic-fc.c +++ b/modules/indic/indic-fc.c @@ -321,7 +321,7 @@ indic_engine_shape (PangoEngineShape *engine, PangoFont *font, const char *text, gint length, - PangoAnalysis *analysis, + const PangoAnalysis *analysis, PangoGlyphString *glyphs) { PangoFcFont *fc_font; diff --git a/modules/khmer/khmer-fc.c b/modules/khmer/khmer-fc.c index 2804741e..9fd9bab5 100644 --- a/modules/khmer/khmer-fc.c +++ b/modules/khmer/khmer-fc.c @@ -519,7 +519,7 @@ khmer_engine_shape (PangoEngineShape *engine, PangoFont *font, const char *text, int length, - PangoAnalysis *analysis, + const PangoAnalysis *analysis, PangoGlyphString *glyphs) { PangoFcFont *fc_font; diff --git a/modules/syriac/syriac-fc.c b/modules/syriac/syriac-fc.c index 9cbbf511..1e10df3e 100644 --- a/modules/syriac/syriac-fc.c +++ b/modules/syriac/syriac-fc.c @@ -176,7 +176,7 @@ fallback_shape (PangoEngineShape *engine, PangoFont *font, const char *text, gint length, - PangoAnalysis *analysis, + const PangoAnalysis *analysis, PangoGlyphString *glyphs) { PangoFcFont *fc_font = PANGO_FC_FONT (font); @@ -245,7 +245,7 @@ syriac_engine_shape (PangoEngineShape *engine, PangoFont *font, const char *text, gint length, - PangoAnalysis *analysis, + const PangoAnalysis *analysis, PangoGlyphString *glyphs) { PangoFcFont *fc_font; diff --git a/modules/thai/thai-shaper.c b/modules/thai/thai-shaper.c index bb62a9c1..409b3083 100644 --- a/modules/thai/thai-shaper.c +++ b/modules/thai/thai-shaper.c @@ -528,7 +528,7 @@ thai_engine_shape (PangoEngineShape *engine, PangoFont *font, const char *text, gint length, - PangoAnalysis *analysis, + const PangoAnalysis *analysis, PangoGlyphString *glyphs) { gint n_chars; diff --git a/modules/thai/thai-shaper.h b/modules/thai/thai-shaper.h index 94322ab0..3349ed3b 100644 --- a/modules/thai/thai-shaper.h +++ b/modules/thai/thai-shaper.h @@ -81,7 +81,7 @@ thai_engine_shape (PangoEngineShape *engine, PangoFont *font, const char *text, gint length, - PangoAnalysis *analysis, + const PangoAnalysis *analysis, PangoGlyphString *glyphs); #endif /* __THAI_SHAPER_H__ */ diff --git a/modules/tibetan/tibetan-fc.c b/modules/tibetan/tibetan-fc.c index 50a0b046..1781edca 100644 --- a/modules/tibetan/tibetan-fc.c +++ b/modules/tibetan/tibetan-fc.c @@ -484,7 +484,7 @@ tibetan_engine_shape (PangoEngineShape *engine, PangoFont *font, const char *text, int length, - PangoAnalysis *analysis, + const PangoAnalysis *analysis, PangoGlyphString *glyphs) { PangoFcFont *fc_font; diff --git a/pango/pango-context.c b/pango/pango-context.c index c47cf9ab..49db52a9 100644 --- a/pango/pango-context.c +++ b/pango/pango-context.c @@ -646,8 +646,6 @@ itemize_state_init (ItemizeState *state, PangoAttrIterator *cached_iter, const PangoFontDescription *desc) { - gunichar *text_ucs4; - long n_chars; state->context = context; state->text = text; diff --git a/pango/pango-engine-private.h b/pango/pango-engine-private.h index d56a092f..5c88a4b1 100644 --- a/pango/pango-engine-private.h +++ b/pango/pango-engine-private.h @@ -31,7 +31,7 @@ void _pango_engine_shape_shape (PangoEngineShape *engine, PangoFont *font, const char *text, int length, - PangoAnalysis *analysis, + const PangoAnalysis *analysis, PangoGlyphString *glyphs); PangoCoverageLevel _pango_engine_shape_covers (PangoEngineShape *engine, PangoFont *font, diff --git a/pango/pango-engine.c b/pango/pango-engine.c index ed7df7d2..da06a516 100644 --- a/pango/pango-engine.c +++ b/pango/pango-engine.c @@ -63,7 +63,7 @@ _pango_engine_shape_shape (PangoEngineShape *engine, PangoFont *font, const char *text, int length, - PangoAnalysis *analysis, + const PangoAnalysis *analysis, PangoGlyphString *glyphs) { glyphs->num_glyphs = 0; @@ -99,7 +99,7 @@ fallback_engine_shape (PangoEngineShape *engine, PangoFont *font, const char *text, gint length, - PangoAnalysis *analysis, + const PangoAnalysis *analysis, PangoGlyphString *glyphs) { int n_chars; diff --git a/pango/pango-engine.h b/pango/pango-engine.h index 591eadff..ae101a13 100644 --- a/pango/pango-engine.h +++ b/pango/pango-engine.h @@ -181,7 +181,7 @@ struct _PangoEngineShapeClass PangoFont *font, const char *text, int length, - PangoAnalysis *analysis, + const PangoAnalysis *analysis, PangoGlyphString *glyphs); PangoCoverageLevel (*covers) (PangoEngineShape *engine, PangoFont *font, diff --git a/pango/pango-glyph.h b/pango/pango-glyph.h index a3d0772b..1195f135 100644 --- a/pango/pango-glyph.h +++ b/pango/pango-glyph.h @@ -124,7 +124,7 @@ void pango_glyph_string_x_to_index (PangoGlyphString *glyphs, */ void pango_shape (const gchar *text, gint length, - PangoAnalysis *analysis, + const PangoAnalysis *analysis, PangoGlyphString *glyphs); GList *pango_reorder_items (GList *logical_items); diff --git a/pango/pango-layout.c b/pango/pango-layout.c index 9befbf65..35159e76 100644 --- a/pango/pango-layout.c +++ b/pango/pango-layout.c @@ -3384,7 +3384,6 @@ pango_layout_line_unref (PangoLayoutLine *line) private->ref_count--; if (private->ref_count == 0) { - GSList *tmp_list = line->runs; g_slist_foreach (line->runs, (GFunc)free_run, GINT_TO_POINTER (1)); g_slist_free (line->runs); g_slice_free (PangoLayoutLinePrivate, private); diff --git a/pango/shape.c b/pango/shape.c index 6ff3f379..aa712192 100644 --- a/pango/shape.c +++ b/pango/shape.c @@ -40,7 +40,7 @@ void pango_shape (const gchar *text, gint length, - PangoAnalysis *analysis, + const PangoAnalysis *analysis, PangoGlyphString *glyphs) { int i; -- cgit v1.2.1