diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2020-04-14 18:15:03 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2020-06-08 17:07:01 +0100 |
commit | 6d90ae0ce23b4ebf25f63d6b1a4f209b49753f22 (patch) | |
tree | 03fe80b6f9bebdf75f45251b7dca464edac3a820 /pango | |
parent | 5bd63ea4ebb2bb8d9fd0fd03211b33ecc573764c (diff) | |
download | pango-6d90ae0ce23b4ebf25f63d6b1a4f209b49753f22.tar.gz |
Add missing GType for PangoOT deprecated types
This way consumers of the deprecated API can get appropriate memory
management for a couple of boxed types.
Diffstat (limited to 'pango')
-rw-r--r-- | pango/pango-ot-buffer.c | 14 | ||||
-rw-r--r-- | pango/pango-ot-ruleset.c | 4 | ||||
-rw-r--r-- | pango/pango-ot.h | 10 |
3 files changed, 28 insertions, 0 deletions
diff --git a/pango/pango-ot-buffer.c b/pango/pango-ot-buffer.c index 334df746..bec4365a 100644 --- a/pango/pango-ot-buffer.c +++ b/pango/pango-ot-buffer.c @@ -23,6 +23,20 @@ #include "pango-ot-private.h" +static PangoOTBuffer * +pango_ot_buffer_copy (PangoOTBuffer *src) +{ + PangoOTBuffer *dst = g_slice_new (PangoOTBuffer); + + dst->buffer = hb_buffer_reference (src->buffer); + + return dst; +} + +G_DEFINE_BOXED_TYPE (PangoOTBuffer, pango_ot_buffer, + pango_ot_buffer_copy, + pango_ot_buffer_destroy) + /** * pango_ot_buffer_new * @font: a #PangoFcFont diff --git a/pango/pango-ot-ruleset.c b/pango/pango-ot-ruleset.c index 36bf65a2..9df8faef 100644 --- a/pango/pango-ot-ruleset.c +++ b/pango/pango-ot-ruleset.c @@ -364,6 +364,10 @@ pango_ot_ruleset_description_equal (const PangoOTRulesetDescription *desc1, return TRUE; } +G_DEFINE_BOXED_TYPE (PangoOTRulesetDescription, pango_ot_ruleset_description, + pango_ot_ruleset_description_copy, + pango_ot_ruleset_description_free) + /** * pango_ot_ruleset_description_copy: * @desc: ruleset description to copy diff --git a/pango/pango-ot.h b/pango/pango-ot.h index 501ca8b6..2c9f42d5 100644 --- a/pango/pango-ot.h +++ b/pango/pango-ot.h @@ -300,6 +300,11 @@ PangoOTTag *pango_ot_info_list_features (PangoOTInfo *info, guint script_index, guint language_index); +#define PANGO_TYPE_OT_BUFFER (pango_ot_buffer_get_type()) + +PANGO_DEPRECATED +GType pango_ot_buffer_get_type (void) G_GNUC_CONST; + PANGO_DEPRECATED PangoOTBuffer *pango_ot_buffer_new (PangoFcFont *font); PANGO_DEPRECATED @@ -378,6 +383,11 @@ PangoLanguage *pango_ot_tag_to_language (PangoOTTag language_tag) G_GNUC_ PANGO_DEPRECATED PangoOTTag pango_ot_tag_from_language (PangoLanguage *language) G_GNUC_CONST; +#define PANGO_TYPE_OT_RULESET_DESCRIPTION (pango_ot_ruleset_description_get_type()) + +PANGO_DEPRECATED +GType pango_ot_ruleset_description_get_type (void) G_GNUC_CONST; + PANGO_DEPRECATED guint pango_ot_ruleset_description_hash (const PangoOTRulesetDescription *desc) G_GNUC_PURE; |