diff options
author | Brian Cameron <bcameron@src.gnome.org> | 2001-06-21 15:59:44 +0000 |
---|---|---|
committer | Brian Cameron <bcameron@src.gnome.org> | 2001-06-21 15:59:44 +0000 |
commit | 0dea9a34a2d8906d55d3b961fb821e2c731c4c08 (patch) | |
tree | 7e1f41f7d6945b7473e770bdc67ab8364374fa6c /atk/atktext.c | |
parent | d051eba08172fd3fbdff608914ec3c7bab4d8139 (diff) | |
download | atk-0dea9a34a2d8906d55d3b961fb821e2c731c4c08.tar.gz |
Here is a patch for
atkeditabletext.h
atkobject.h
atktext.c
atktext.h
in atk/atk. There is a new convenience function in atktext.[ch] called
AtkAttributeSet_free() which frees an AtkAttributeSet. I have also removed the
definitions of AtkAttribute and AtkAttributeSet from atkobject.h and moved them
to atktext.h. atkeditabletext.h now #includes atktext.h so it has access to
these definitions. I have discussed these changes with Bill.
Diffstat (limited to 'atk/atktext.c')
-rwxr-xr-x | atk/atktext.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/atk/atktext.c b/atk/atktext.c index 95b18b8..c068703 100755 --- a/atk/atktext.c +++ b/atk/atktext.c @@ -600,3 +600,27 @@ atk_text_set_caret_offset (AtkText *text, return FALSE; } } + +/** + * AtkAttributeSet_free: + * @attrib_set: The #AtkAttributeSet to free + * + * Frees the memory used by an #AtkAttributeSet, including all its + * #AtkAttributes + * + **/ +void +AtkAttributeSet_free(AtkAttributeSet *attrib_set) +{ + gint index; + + if (attrib_set == NULL) + return; + + for (index = 0; index < g_slist_length(attrib_set); index++) + { + g_free(((AtkAttribute*) (g_slist_nth(attrib_set,index)->data))->name); + g_free(((AtkAttribute*) (g_slist_nth(attrib_set,index)->data))->value); + } + g_slist_free(attrib_set); +} |