diff options
author | Federico Mena Quintero <federico@helixcode.com> | 2000-11-25 04:41:01 +0800 |
---|---|---|
committer | Federico Mena Quintero <federico@src.gnome.org> | 2000-11-25 04:41:01 +0800 |
commit | 39dc8f4fc8a9e459689ee61a197270d8e23e68de (patch) | |
tree | 38b2f4180db53eab8724396bb7d99baed73be4b6 /calendar/pcs | |
parent | 0a72c5b5242b4dc732261cd1f3afa8cc72e7ee17 (diff) | |
download | gsoc2013-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/pcs')
-rw-r--r-- | calendar/pcs/cal-backend-file.c | 11 | ||||
-rw-r--r-- | calendar/pcs/cal-backend.c | 3 |
2 files changed, 9 insertions, 5 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 diff --git a/calendar/pcs/cal-backend.c b/calendar/pcs/cal-backend.c index b2b16b2c9e..f4d06518c1 100644 --- a/calendar/pcs/cal-backend.c +++ b/calendar/pcs/cal-backend.c @@ -479,7 +479,7 @@ cal_backend_log_entry (CalBackend *backend, CalObjType cot, CalBackendLogEntryType type) { - CalBackendLogEntry *entry = g_new0 (CalBackendLogEntry, 1); + CalBackendLogEntry *entry; g_assert (CLASS (backend)->get_type_by_uid != NULL); @@ -565,6 +565,7 @@ cal_backend_log_sync (CalBackend *backend) || entry->time_stamp > end_time) end_time = entry->time_stamp; + g_free (entry->uid); g_free (entry); } cal_backend_set_node_timet (tnode, "start", start_time); |