mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 01:48:07 +02:00
Add a _cairo_font_options_fini function
The variations member of cairo_font_options_t is allocated, so we need to have a method to free it for cases where the struct is embedded in larger structs, such as cairo_ft_options_t.
This commit is contained in:
parent
17871c52ef
commit
1f0b6707ea
2 changed files with 10 additions and 1 deletions
|
|
@ -154,6 +154,12 @@ cairo_font_options_copy (const cairo_font_options_t *original)
|
|||
return options;
|
||||
}
|
||||
|
||||
void
|
||||
_cairo_font_options_fini (cairo_font_options_t *options)
|
||||
{
|
||||
free (options->variations);
|
||||
}
|
||||
|
||||
/**
|
||||
* cairo_font_options_destroy:
|
||||
* @options: a #cairo_font_options_t
|
||||
|
|
@ -169,7 +175,7 @@ cairo_font_options_destroy (cairo_font_options_t *options)
|
|||
if (cairo_font_options_status (options))
|
||||
return;
|
||||
|
||||
free (options->variations);
|
||||
_cairo_font_options_fini (options);
|
||||
free (options);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -880,6 +880,9 @@ cairo_private void
|
|||
_cairo_font_options_init_copy (cairo_font_options_t *options,
|
||||
const cairo_font_options_t *other);
|
||||
|
||||
cairo_private void
|
||||
_cairo_font_options_fini (cairo_font_options_t *options);
|
||||
|
||||
cairo_private void
|
||||
_cairo_font_options_set_lcd_filter (cairo_font_options_t *options,
|
||||
cairo_lcd_filter_t lcd_filter);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue