From 33f1c3bfadc6be4a58a5a54a9fd7b57ef9234aeb Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 2 Mar 2012 16:32:55 +0000 Subject: [PATCH 4/4] Rename internal NUM_TP_LIST_HANDLES to TP_NUM_LIST_HANDLES for completeness Bug: https://bugs.freedesktop.org/show_bug.cgi?id=46470 --- telepathy-glib/base-contact-list-internal.h | 2 +- telepathy-glib/base-contact-list.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/telepathy-glib/base-contact-list-internal.h b/telepathy-glib/base-contact-list-internal.h index 928b200..844e264 100644 --- a/telepathy-glib/base-contact-list-internal.h +++ b/telepathy-glib/base-contact-list-internal.h @@ -35,7 +35,7 @@ typedef enum { TP_LIST_HANDLE_PUBLISH, TP_LIST_HANDLE_STORED, TP_LIST_HANDLE_DENY, - NUM_TP_LIST_HANDLES + TP_NUM_LIST_HANDLES } TpListHandle; TpChannelGroupFlags _tp_base_contact_list_get_list_flags ( diff --git a/telepathy-glib/base-contact-list.c b/telepathy-glib/base-contact-list.c index 5039f9b..aa53fbd 100644 --- a/telepathy-glib/base-contact-list.c +++ b/telepathy-glib/base-contact-list.c @@ -258,7 +258,7 @@ struct _TpBaseContactListPrivate GError *failure /* initially NULL */; /* values referenced; 0'th remains NULL */ - TpBaseContactListChannel *lists[NUM_TP_LIST_HANDLES]; + TpBaseContactListChannel *lists[TP_NUM_LIST_HANDLES]; TpHandleRepoIface *group_repo; /* handle borrowed from channel => referenced TpContactGroupChannel */ @@ -578,7 +578,7 @@ tp_base_contact_list_free_contents (TpBaseContactList *self) "Unable to complete channel request due to disconnection"); tp_base_contact_list_fail_blocked_contact_requests (self, &error); - for (i = 0; i < NUM_TP_LIST_HANDLES; i++) + for (i = 0; i < TP_NUM_LIST_HANDLES; i++) tp_clear_object (self->priv->lists + i); tp_clear_pointer (&self->priv->groups, g_hash_table_unref); @@ -699,7 +699,7 @@ tp_base_contact_list_repo_normalize_group (TpHandleRepoIface *repo, /* elements 0, 1... of this enum must be kept in sync with elements 1, 2... * of the enum in the -internal header */ static const gchar * const tp_base_contact_list_contact_lists - [NUM_TP_LIST_HANDLES + 1] = { + [TP_NUM_LIST_HANDLES + 1] = { "subscribe", "publish", "stored", @@ -941,7 +941,7 @@ tp_base_contact_list_foreach_channel (TpChannelManager *manager, /* in both cases, we look in channel_requests to avoid including channels * that don't officially exist yet */ - for (i = 0; i < NUM_TP_LIST_HANDLES; i++) + for (i = 0; i < TP_NUM_LIST_HANDLES; i++) { if (self->priv->lists[i] != NULL && !g_hash_table_lookup_extended (self->priv->channel_requests, @@ -1169,7 +1169,7 @@ tp_base_contact_list_request_helper (TpChannelManager *manager, { /* TpBaseConnection already checked the handle for validity */ g_assert (handle > 0); - g_assert (handle < NUM_TP_LIST_HANDLES); + g_assert (handle < TP_NUM_LIST_HANDLES); if (handle == TP_LIST_HANDLE_STORED && !tp_base_contact_list_get_contact_list_persists (self)) @@ -1932,7 +1932,7 @@ tp_base_contact_list_set_list_received (TpBaseContactList *self) tp_handle_set_destroy (blocked); } - for (i = 0; i < NUM_TP_LIST_HANDLES; i++) + for (i = 0; i < TP_NUM_LIST_HANDLES; i++) { if (self->priv->lists[i] != NULL) tp_base_contact_list_announce_channel (self, self->priv->lists[i], -- 1.7.9.1