aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/cal-util/test-recur.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/cal-util/test-recur.c')
-rw-r--r--calendar/cal-util/test-recur.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/calendar/cal-util/test-recur.c b/calendar/cal-util/test-recur.c
index 6ec214b18b..2c94b28921 100644
--- a/calendar/cal-util/test-recur.c
+++ b/calendar/cal-util/test-recur.c
@@ -117,15 +117,17 @@ get_line (char *s,
static void
generate_occurrences (icalcomponent *icalcomp)
{
- icalcomponent *tmp_icalcomp;
- CalComponent *comp;
- gint occurrences;
+ icalcompiter iter;
- for (tmp_icalcomp = icalcomponent_get_first_component (icalcomp, ICAL_ANY_COMPONENT);
- tmp_icalcomp;
- tmp_icalcomp = icalcomponent_get_next_component (icalcomp, ICAL_ANY_COMPONENT)) {
+ for (iter = icalcomponent_begin_component (icalcomp, ICAL_ANY_COMPONENT);
+ icalcompiter_deref (&iter) != NULL;
+ icalcompiter_next (&iter)) {
+ icalcomponent *tmp_icalcomp;
+ CalComponent *comp;
icalcomponent_kind kind;
+ gint occurrences;
+ tmp_icalcomp = icalcompiter_deref (&iter);
kind = icalcomponent_isa (tmp_icalcomp);
if (!(kind == ICAL_VEVENT_COMPONENT