diff options
author | Matthias Clasen <mclasen@redhat.com> | 2022-01-25 08:16:55 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2022-01-25 15:31:25 -0500 |
commit | ec2958682949220f15a32066eff412d857c735c5 (patch) | |
tree | 339adf374dfa447b80a8e8470c904aed7064bd52 /pango/pangocairo-font.c | |
parent | 342a0265b3992925105d04b1ef22cda6a7fa8786 (diff) | |
download | pango-ec2958682949220f15a32066eff412d857c735c5.tar.gz |
line: Don't return GSList
Change pango_line_get_runs to return an array.
So far, this changes just the API. All internals
are still done on the list.
Diffstat (limited to 'pango/pangocairo-font.c')
-rw-r--r-- | pango/pangocairo-font.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pango/pangocairo-font.c b/pango/pangocairo-font.c index d2454328..738b741f 100644 --- a/pango/pangocairo-font.c +++ b/pango/pangocairo-font.c @@ -190,19 +190,19 @@ max_glyph_width (PangoLayout *layout) { PangoLines *lines; int max_width = 0; - GSList *r; lines = pango_layout_get_lines (layout); for (int i = 0; i < pango_lines_get_line_count (lines); i++) { PangoLine *line = pango_lines_get_line (lines, i, NULL, NULL); + PangoRun **runs = pango_line_get_runs (line); + int n_runs = pango_line_get_run_count (line); - for (r = pango_line_get_runs (line); r; r = r->next) + for (int j = 0; j < n_runs; j++) { - PangoGlyphString *glyphs = ((PangoGlyphItem *)r->data)->glyphs; - int i; + PangoGlyphString *glyphs = pango_run_get_glyphs (runs[j]); - for (i = 0; i < glyphs->num_glyphs; i++) + for (int i = 0; i < glyphs->num_glyphs; i++) { if (glyphs->glyphs[i].geometry.width > max_width) max_width = glyphs->glyphs[i].geometry.width; |