Skip to content
  • Jonas Dreßler's avatar
    Add API to compare PangoAttrLists · f1ad2308
    Jonas Dreßler authored
    Add a new `pango_attr_list_equal` API that allows comparing the
    attributes included in two PangoAttrLists and returns TRUE if the lists
    contain the same attributes and apply to the same ranges.
    
    The function avoids any copying of attributes or lists and applies a
    minor optimization of skipping the equality check for attributes that
    were already found in both lists. Other possible optimizations that
    could be added if necessary would be storing the length of the
    attributes list in the PangoAttrList class to avoid the `g_slist_length`
    calls or reusing the `other_iter` pointer in case all attributes from 0
    to n were already found.
    f1ad2308