Re: Where is pango_glyph_item_free()?



On Wed, 2003-03-12 at 10:02, Jeff Franks wrote:
> Hi,
> 
> I am writing a C++ wraper for PangoGlyphItem and have noticed that 
> pango_glyph_item_free() is missing. It is documentated in 
> pango-Glyph-Storage.html and from examining the source code for 
> functions like pango_glyph_item_split() and 
> pango_glyph_item_apply_attrs() and pango_layout_iter_get_run(), not only 
> the PangoGlyphItem returned needs to be freed but the PangoItem and 
> PangoGlyphString it contains.
> 
> If pango_glyph_item_free() is missing and needs to be added, is it OK to 
> free PangoGlyphItem , PangoItem and PangoGlyphString separately until then.

If you feel an urgent need to wrap PangoGlyphItem, yes, you can
free a PangoGlyphItem by freeing the item, the glyph string, and
then g_free() the struct. (See free_run in pangolayout.c ...
a PangoLayoutRun is a typedef for PangoGlyphItem)

If you can avoid wrapping Pango at a level below PangoLayout, you'll
probably be better off for long-term compatibility, though. 
There's no real danger of it changing for a a couple of years, but 
the stuff below PangoLayout is distinctly messy in some areas,
and inviting of cleanup. (Plus, it's not very language-binding
friendly in design.)

Regards,
                                       Owen





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