diff options
author | Timm Bäder <mail@baedert.org> | 2020-04-17 08:21:36 +0200 |
---|---|---|
committer | Timm Bäder <mail@baedert.org> | 2020-06-08 19:16:31 +0200 |
commit | a79e38a784430af97c6b9423f63fc89f90482da2 (patch) | |
tree | f17ac4accf048821e0108a6764f6fefd1f9b734a /pango | |
parent | 0efa31306ce04b3b3a6c8e2da96af32834ac860a (diff) | |
download | pango-a79e38a784430af97c6b9423f63fc89f90482da2.tar.gz |
attributes: Add _pango_attr_list_has_attributes
A private function to find empty attribute lists
Diffstat (limited to 'pango')
-rw-r--r-- | pango/pango-attributes-private.h | 2 | ||||
-rw-r--r-- | pango/pango-attributes.c | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/pango/pango-attributes-private.h b/pango/pango-attributes-private.h index efeb88cd..b913cc2f 100644 --- a/pango/pango-attributes-private.h +++ b/pango/pango-attributes-private.h @@ -37,6 +37,8 @@ struct _PangoAttrList void _pango_attr_list_init (PangoAttrList *list); void _pango_attr_list_destroy (PangoAttrList *list); +gboolean _pango_attr_list_has_attributes (const PangoAttrList *list); + void _pango_attr_list_get_iterator (PangoAttrList *list, PangoAttrIterator *iterator); diff --git a/pango/pango-attributes.c b/pango/pango-attributes.c index 5ac955c4..84d24838 100644 --- a/pango/pango-attributes.c +++ b/pango/pango-attributes.c @@ -1989,6 +1989,12 @@ pango_attr_list_equal (PangoAttrList *list, return TRUE; } +gboolean +_pango_attr_list_has_attributes (const PangoAttrList *list) +{ + return (list->attributes != NULL); +} + G_DEFINE_BOXED_TYPE (PangoAttrIterator, pango_attr_iterator, pango_attr_iterator_copy, |