Bug 24730 - misleading use cases in cairo_scaled_font_text_to_glyphs's docs
Summary: misleading use cases in cairo_scaled_font_text_to_glyphs's docs
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 1.9.5
Hardware: All All
: medium minor
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-26 01:32 UTC by Dimitur Kirov
Modified: 2009-10-26 04:09 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

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.