[cairo] 1.4.2 release planned for today, 1.4.4 in a few weeks

Behdad Esfahbod behdad at behdad.org
Fri Mar 16 13:54:31 PDT 2007


Great stuff again!

Should we use some gcc attribute to get warnings about ignoring
cairo_status_t and cairo_int_status_t return values?


On Fri, 2007-03-16 at 16:16 -0400, Chris Wilson wrote:
> -    _cairo_scaled_font_init (&scaled_font->base,
> +    if (_cairo_scaled_font_init (&scaled_font->base,
>                              font_face,
>                              font_matrix, ctm, options,
> -                            &cairo_ft_scaled_font_backend);
> +                            &cairo_ft_scaled_font_backend)) {
> +       _cairo_scaled_font_fini (&scaled_font->base);
> +       free (scaled_font);
> +       _cairo_ft_unscaled_font_unlock_face (unscaled);
> +       return NULL;
> +    } 

The idiom is that if an _init() fails, it should clean after itself and
_fini() should not be called on it.  So, the _fini() here should be
removed, and _init() fixed to clean.

-- 
behdad
http://behdad.org/

"Those who would give up Essential Liberty to purchase a little
 Temporary Safety, deserve neither Liberty nor Safety."
        -- Benjamin Franklin, 1759





More information about the cairo mailing list