From: Dirk-Jan C. Binnema Date: Mon, 15 Jan 2007 10:33:56 +0000 (+0000) Subject: * modest-pair.[ch]: X-Git-Tag: git_migration_finished~4258 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=bc321ae5f719ae474bb91af2a5dc544f64ab7d80 * modest-pair.[ch]: - small cleanups, documentation pmo-trunk-r621 --- diff --git a/src/modest-pair.c b/src/modest-pair.c index 4d5adca..0f67b84 100644 --- a/src/modest-pair.c +++ b/src/modest-pair.c @@ -45,7 +45,7 @@ modest_pair_new (gpointer first, gpointer second, gboolean own) void -modest_pair_destroy (ModestPair *pair) +modest_pair_free (ModestPair *pair) { if (!pair) return; @@ -59,13 +59,12 @@ modest_pair_destroy (ModestPair *pair) - -GSList* -modest_pair_gslist_destroy (GSList *pairs) +ModestPairList* +modest_pair_list_free (ModestPairList *pairs) { - GSList *cursor = pairs; + ModestPairList *cursor = pairs; while (cursor) { - modest_pair_destroy ((ModestPair*)cursor->data); + modest_pair_free ((ModestPair*)cursor->data); cursor = cursor->next; } g_slist_free (pairs); diff --git a/src/modest-pair.h b/src/modest-pair.h index d573c99..e1ebbfd 100644 --- a/src/modest-pair.h +++ b/src/modest-pair.h @@ -34,12 +34,13 @@ G_BEGIN_DECLS -struct _ModestPair { +typedef struct _ModestPair { gpointer *first; gpointer *second; gboolean own; -}; -typedef struct _ModestPair ModestPair; +} ModestPair; + +typedef GSList ModestPairList; /** @@ -52,30 +53,30 @@ typedef struct _ModestPair ModestPair; * * Returns: a newly allocated ModestPair instance */ -ModestPair* modest_pair_new (gpointer first, gpointer second, gboolean own); +ModestPair* modest_pair_new (gpointer first, gpointer second, gboolean own); /** - * modest_pair_destroy: + * modest_pair_free: * @self: a valid ModestPair instance or NULL * - * destroy a ModestPair instance. If it was created with own==TRUE, the elements + * free a ModestPair instance. If it was created with own==TRUE, the elements * will be g_free'd as well. If pair==NULL, nothing will be done. */ -void modest_pair_destroy (ModestPair *self); +void modest_pair_free (ModestPair *self); + /** - * modest_pair_gslist_destroy: - * @pairs: a list of ModestPair instances + * modest_pair_list_free: + * @pairs: a valid ModestPairList * * convenience function to destroy all pairs in a list * * Returns: NULL */ -GSList *modest_pair_gslist_destroy (GSList *pairs); - +ModestPairList *modest_pair_list_free (ModestPairList *pairs); G_END_DECLS