aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/pcs/cal.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@helixcode.com>2000-12-07 06:28:19 +0800
committerJP Rosevear <jpr@src.gnome.org>2000-12-07 06:28:19 +0800
commitb05cea89b97e1e0d5f01b243d16129615d176b2d (patch)
tree17974ee2c7ee82a0413b1ee7dbf6034434ac3e92 /calendar/pcs/cal.c
parentbf5e92e96c434bb6270844cd7ef7a1405f95f4cf (diff)
downloadgsoc2013-evolution-b05cea89b97e1e0d5f01b243d16129615d176b2d.tar.gz
gsoc2013-evolution-b05cea89b97e1e0d5f01b243d16129615d176b2d.tar.zst
gsoc2013-evolution-b05cea89b97e1e0d5f01b243d16129615d176b2d.zip
kill (Cal_get_changes): return the corba sequence directly
2000-12-06 JP Rosevear <jpr@helixcode.com> * pcs/cal.c (build_change_seq): kill (Cal_get_changes): return the corba sequence directly * pcs/cal-backend.h: update prototype * pcs/cal-backend.c (cal_backend_compute_changes_foreach_key): Build the corba struct rather than the old calobjchange thing (cal_backend_compute_changes): ditto. build and return the actual corba sequence rather than the list of calobjchanges (cal_backend_get_changes): return the corba sequence * cal-util/cal-util.h: Remove CalObjChange cruft * cal-util/cal-util.c (cal_obj_change_list_free): Kill svn path=/trunk/; revision=6826
Diffstat (limited to 'calendar/pcs/cal.c')
-rw-r--r--calendar/pcs/cal.c38
1 files changed, 1 insertions, 37 deletions
diff --git a/calendar/pcs/cal.c b/calendar/pcs/cal.c
index a7f0c5dfce..179c850475 100644
--- a/calendar/pcs/cal.c
+++ b/calendar/pcs/cal.c
@@ -278,35 +278,6 @@ Cal_get_uids (PortableServer_Servant servant,
return seq;
}
-static GNOME_Evolution_Calendar_CalObjChangeSeq *
-build_change_seq (GList *changes)
-{
- GList *l;
- int n, i;
- GNOME_Evolution_Calendar_CalObjChangeSeq *seq;
-
- n = g_list_length (changes);
-
- seq = GNOME_Evolution_Calendar_CalObjChangeSeq__alloc ();
- CORBA_sequence_set_release (seq, TRUE);
- seq->_length = n;
- seq->_buffer = CORBA_sequence_GNOME_Evolution_Calendar_CalObjChange_allocbuf (n);
-
- /* Fill the sequence */
- for (i = 0, l = changes; l; i++, l = l->next) {
- CalObjChange *c;
- GNOME_Evolution_Calendar_CalObjChange *corba_c;
-
- c = l->data;
- corba_c = &seq->_buffer[i];
-
- corba_c->calobj = CORBA_string_dup (c->calobj);
- corba_c->type = c->type;
- }
-
- return seq;
-}
-
/* Cal::get_changes method */
static GNOME_Evolution_Calendar_CalObjChangeSeq *
Cal_get_changes (PortableServer_Servant servant,
@@ -316,8 +287,6 @@ Cal_get_changes (PortableServer_Servant servant,
{
Cal *cal;
CalPrivate *priv;
- GList *changes;
- GNOME_Evolution_Calendar_CalObjChangeSeq *seq;
int t;
cal = CAL (bonobo_object_from_servant (servant));
@@ -325,12 +294,7 @@ Cal_get_changes (PortableServer_Servant servant,
t = uncorba_obj_type (type);
- changes = cal_backend_get_changes (priv->backend, t, change_id);
- seq = build_change_seq (changes);
-
- cal_obj_change_list_free (changes);
-
- return seq;
+ return cal_backend_get_changes (priv->backend, t, change_id);
}
/* Cal::get_objects_in_range method */