aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/pcs/cal-backend-file.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/pcs/cal-backend-file.c')
-rw-r--r--calendar/pcs/cal-backend-file.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/calendar/pcs/cal-backend-file.c b/calendar/pcs/cal-backend-file.c
index 715e1e70bc..c63e690246 100644
--- a/calendar/pcs/cal-backend-file.c
+++ b/calendar/pcs/cal-backend-file.c
@@ -550,18 +550,21 @@ static void
scan_vcalendar (CalBackendFile *cbfile)
{
CalBackendFilePrivate *priv;
- icalcomponent *icalcomp;
+ icalcompiter iter;
priv = cbfile->priv;
g_assert (priv->icalcomp != NULL);
g_assert (priv->comp_uid_hash != NULL);
- for (icalcomp = icalcomponent_get_first_component (priv->icalcomp, ICAL_ANY_COMPONENT);
- icalcomp;
- icalcomp = icalcomponent_get_next_component (priv->icalcomp, ICAL_ANY_COMPONENT)) {
+ for (iter = icalcomponent_begin_component (priv->icalcomp, ICAL_ANY_COMPONENT);
+ icalcompiter_deref (&iter) != NULL;
+ icalcompiter_next (&iter)) {
+ icalcomponent *icalcomp;
icalcomponent_kind kind;
CalComponent *comp;
+ icalcomp = icalcompiter_deref (&iter);
+
kind = icalcomponent_isa (icalcomp);
if (!(kind == ICAL_VEVENT_COMPONENT