[pango/introspection-fixes: 5/7] Add a boxed type for PangoAttrIterator



commit f5cd8b93e0f3b463ba4f660cce2db86dfef0a165
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Fri Aug 2 11:16:28 2019 +0100

    Add a boxed type for PangoAttrIterator
    
    Makes it usable by language bindings, and avoids warnings when
    generating introspection data.
    
    We already have the necessary public API, we're just missing a GType for
    it.

 pango/pango-attributes.c | 5 +++++
 pango/pango-attributes.h | 3 +++
 2 files changed, 8 insertions(+)
---
diff --git a/pango/pango-attributes.c b/pango/pango-attributes.c
index b5e0f77c..2f02e264 100644
--- a/pango/pango-attributes.c
+++ b/pango/pango-attributes.c
@@ -1835,6 +1835,11 @@ pango_attr_list_get_attributes (PangoAttrList *list)
   return g_slist_copy_deep (list->attributes, (GCopyFunc)pango_attribute_copy, NULL);
 }
 
+G_DEFINE_BOXED_TYPE (PangoAttrIterator,
+                     pango_attr_iterator,
+                     pango_attr_iterator_copy,
+                     pango_attr_iterator_destroy)
+
 /**
  * pango_attr_list_get_iterator:
  * @list: a #PangoAttrList
diff --git a/pango/pango-attributes.h b/pango/pango-attributes.h
index d46ce6f0..b9ab6459 100644
--- a/pango/pango-attributes.h
+++ b/pango/pango-attributes.h
@@ -588,6 +588,9 @@ PangoAttrList *pango_attr_list_filter (PangoAttrList       *list,
 PANGO_AVAILABLE_IN_1_44
 GSList        *pango_attr_list_get_attributes    (PangoAttrList *list);
 
+PANGO_AVAILABLE_IN_1_44
+GType              pango_attr_iterator_get_type  (void) G_GNUC_CONST;
+
 PANGO_AVAILABLE_IN_ALL
 PangoAttrIterator *pango_attr_list_get_iterator  (PangoAttrList  *list);
 


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