aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/cal-util/test-recur.c
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@helixcode.com>2000-11-25 04:41:01 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2000-11-25 04:41:01 +0800
commit39dc8f4fc8a9e459689ee61a197270d8e23e68de (patch)
tree38b2f4180db53eab8724396bb7d99baed73be4b6 /calendar/cal-util/test-recur.c
parent0a72c5b5242b4dc732261cd1f3afa8cc72e7ee17 (diff)
downloadgsoc2013-evolution-39dc8f4fc8a9e459689ee61a197270d8e23e68de.tar.gz
gsoc2013-evolution-39dc8f4fc8a9e459689ee61a197270d8e23e68de.tar.zst
gsoc2013-evolution-39dc8f4fc8a9e459689ee61a197270d8e23e68de.zip
Use the new libical external iterators (icalcomponent_begin_component()
2000-11-24 Federico Mena Quintero <federico@helixcode.com> * pcs/cal-backend-file.c (scan_vcalendar): Use the new libical external iterators (icalcomponent_begin_component() and friends); the internal iterators are deprecated. * cal-util/test-recur.c (generate_occurrences): Likewise. * gui/e-itip-control.c (pstream_load): Likewise. * gui/e-meeting-edit.c (e_meeting_edit): Likewise. * pcs/cal-backend.c (cal_backend_log_entry): Plug leak. (cal_backend_log_sync): Free the entry->uid. * util/icalendar-save.[ch]: * util/icalendar-test.c: * util/icalendar.[ch]: Removed obsolete files. svn path=/trunk/; revision=6660
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