Source/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp
static AtkAttributeSet* attributeSetDifference(AtkAttributeSet* a1, AtkAttributeSet* a2)
{
    if (!a2)
        return a1;

    AtkAttributeSet* i = a1;
    AtkAttributeSet* found;
    AtkAttributeSet* toDelete = 0;

    while (i) {
        found = g_slist_find_custom(a2, i->data, (GCompareFunc)compareAttribute);
        if (found) {
            AtkAttributeSet* t = i->next;
            toDelete = g_slist_prepend(toDelete, i->data);
            a1 = g_slist_delete_link(a1, i);
            i = t;
        } else
            i = i->next;
    }

    atk_attribute_set_free(a2);
    atk_attribute_set_free(toDelete);
    return a1;
}
// Returns an AtkAttributeSet with the elements of a1 which are either
// not present or different in a2.  Neither a1 nor a2 should be used
// after calling this function.
Returns an AtkAttributeSet with the elements of a1 which are either
not present or different in a2.  Neither a1 nor a2 should be used
after calling this function.
Returns an AtkAttributeSet with the elements of a1 which are either not present or different in a2 . Neither a1 nor a2 should be used after calling this function .
static AtkAttributeSet* attributeSetDifference(AtkAttributeSet* a1, AtkAttributeSet* a2)
{
    if (!a2)
        return a1;
    AtkAttributeSet* i = a1;
    AtkAttributeSet* found;
    AtkAttributeSet* toDelete = 0;
    while (i) {
        found = g_slist_find_custom(a2, i->data, (GCompareFunc)compareAttribute);
        if (found) {
            AtkAttributeSet* t = i->next;
            toDelete = g_slist_prepend(toDelete, i->data);
            a1 = g_slist_delete_link(a1, i);
            i = t;
        } else
            i = i->next;
    }
    atk_attribute_set_free(a2);
    atk_attribute_set_free(toDelete);
    return a1;
}
static AtkAttributeSet * attributeSetDifference ( AtkAttributeSet * a1 , AtkAttributeSet * a2 ) { if ( ! a2 ) return a1 ; AtkAttributeSet * i = a1 ; AtkAttributeSet * found ; AtkAttributeSet * toDelete = 0 ; while ( i ) { found = g_slist_find_custom ( a2 , i -> data , ( GCompareFunc ) compareAttribute ) ; if ( found ) { AtkAttributeSet * t = i -> next ; toDelete = g_slist_prepend ( toDelete , i -> data ) ; a1 = g_slist_delete_link ( a1 , i ) ; i = t ; } else i = i -> next ; } atk_attribute_set_free ( a2 ) ; atk_attribute_set_free ( toDelete ) ; return a1 ; }
Returns an AtkAttributeSet with the elements of a1 which are either
not present or different in a2.
Returns an AtkAttributeSet with the elements of a1 which are either not present or different in a2 .