mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-05 00:43:40 +02:00
gibaseinfo: Add initialiser macro for GIAttributeIter
Makes it a little easier to use. Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
@@ -784,7 +784,7 @@ const char *
|
||||
gi_base_info_get_attribute (GIBaseInfo *info,
|
||||
const char *name)
|
||||
{
|
||||
GIAttributeIter iter = { 0, };
|
||||
GIAttributeIter iter = GI_ATTRIBUTE_ITER_INIT;
|
||||
const char *curname, *curvalue;
|
||||
while (gi_base_info_iterate_attributes (info, &iter, &curname, &curvalue))
|
||||
{
|
||||
@@ -872,7 +872,7 @@ _attribute_blob_find_first (GIBaseInfo *info,
|
||||
* void
|
||||
* print_attributes (GIBaseInfo *info)
|
||||
* {
|
||||
* GIAttributeIter iter = { 0, };
|
||||
* GIAttributeIter iter = GI_ATTRIBUTE_ITER_INIT;
|
||||
* const char *name;
|
||||
* const char *value;
|
||||
* while (gi_base_info_iterate_attributes (info, &iter, &name, &value))
|
||||
|
Reference in New Issue
Block a user