diff options
author | Paolo Borelli <pborelli@gnome.org> | 2015-07-06 00:20:08 +0200 |
---|---|---|
committer | Paolo Borelli <pborelli@gnome.org> | 2015-07-06 00:31:56 +0200 |
commit | 803430a779c284fa038fcc45f00c188ed504e826 (patch) | |
tree | 4663326e501b817ae6f92870560ab7e1a5cdcd85 /gtk/gtkpango.c | |
parent | 180a378a073d24339dbec53874cf53e082cbb831 (diff) | |
download | gtk+-803430a779c284fa038fcc45f00c188ed504e826.tar.gz |
pango: make merge_attrs return the merged list
This simplifies all the callers
Diffstat (limited to 'gtk/gtkpango.c')
-rw-r--r-- | gtk/gtkpango.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/gtk/gtkpango.c b/gtk/gtkpango.c index 261fac7c3d..63d445f385 100644 --- a/gtk/gtkpango.c +++ b/gtk/gtkpango.c @@ -1300,14 +1300,24 @@ attr_list_merge_filter (PangoAttribute *attribute, /* * _gtk_pango_attr_list_merge: - * @into: a #PangoAttrList where attributes are merged. - * @from: a #PangoAttrList with the attributes to merge + * @into: a #PangoAttrList where attributes are merged or %NULL + * @from: a #PangoAttrList with the attributes to merge or %NULL * * Merges attributes from @from into @into. + * + * Returns: the merged list. */ -void +PangoAttrList * _gtk_pango_attr_list_merge (PangoAttrList *into, PangoAttrList *from) { - pango_attr_list_filter (from, attr_list_merge_filter, into); + if (from) + { + if (into) + pango_attr_list_filter (from, attr_list_merge_filter, into); + else + return pango_attr_list_ref (from); + } + + return into; } |