Bug 24730

Summary: misleading use cases in cairo_scaled_font_text_to_glyphs's docs
Product: cairo Reporter: Dimitur Kirov <dkirov>
Component: generalAssignee: Carl Worth <cworth>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: minor    
Priority: medium    
Version: 1.9.5   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Dimitur Kirov 2009-10-26 01:32:22 UTC
Looking at code examples under cairo_scaled_font_text_to_glyphs there is imporper usage of several cairo functions:

{{{
cairo_glyph_t *glyphs = NULL;
....
cairo_show_glyphs (..., *glyphs, ...);
cairo_glyph_free (*glyphs);
....
}}}
this is wrong, as cairo_glyph_free expects a single pointer

The same inconsistency can be seen in the usage of:
cairo_show_text_glyphs
cairo_text_cluster_free
Comment 1 Chris Wilson 2009-10-26 04:09:54 UTC
Thank you for the bug report.

commit 1a80cd2aa00b232a9a2192a85d6264e44ffcbd69
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Oct 26 11:05:38 2009 +0000

    scaled-font: Fix documentation examples with incorrect derefs
    
    Bug 24730 -- New: misleading use cases in cairo_scaled_font_text_to_glyphs's docs
    http://bugs.freedesktop.org/show_bug.cgi?id=24730
    
    An apparent copy'n'paste error from the code which has to deal with
    indirect pointers crept into the documentation for the same functions.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.