summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Aurich <darkrain42@pidgin.im>2009-05-10 22:41:13 +0000
committerPaul Aurich <darkrain42@pidgin.im>2009-05-10 22:41:13 +0000
commitc62793d393603b64d2a76a24b4cf1388043d300d (patch)
treece945b957c3fdbe96d46f54baf55706f771ee6c1
parent947b01462f3ce97c180bec8de52f4518b8ed0b14 (diff)
parent11fb90a5a2e6a66e5a571e41d865c3e8271f0f5d (diff)
downloadpidgin-c62793d393603b64d2a76a24b4cf1388043d300d.tar.gz
merge of '8905444c7d9adc34230e03e3d074555051164269'
and 'b2ae59736f80aad486d730a79eea79821ea27a46'
-rw-r--r--libpurple/internal.h4
-rw-r--r--libpurple/protocols/myspace/myspace.c10
2 files changed, 5 insertions, 9 deletions
diff --git a/libpurple/internal.h b/libpurple/internal.h
index 9be2c25362..3a2a6d5043 100644
--- a/libpurple/internal.h
+++ b/libpurple/internal.h
@@ -256,10 +256,6 @@ type_name##_get_type (void) \
#endif
-#ifndef ARRAY_LENGTH
-#define ARRAY_LENGTH(arr) (sizeof(arr) / sizeof(*arr))
-#endif
-
/* Safer ways to work with static buffers. When using non-static
* buffers, either use g_strdup_* functions (preferred) or use
* g_strlcpy/g_strlcpy directly. */
diff --git a/libpurple/protocols/myspace/myspace.c b/libpurple/protocols/myspace/myspace.c
index 9d2a8a6f2c..4bf9afcefc 100644
--- a/libpurple/protocols/myspace/myspace.c
+++ b/libpurple/protocols/myspace/myspace.c
@@ -861,10 +861,10 @@ msim_check_inbox_cb(MsimSession *session, const MsimMessage *reply, gpointer dat
{ "FriendRequest", MSIM_INBOX_FRIEND_REQUEST, "http://messaging.myspace.com/index.cfm?fuseaction=mail.friendRequests", NULL },
{ "PictureComment", MSIM_INBOX_PICTURE_COMMENT, "http://home.myspace.com/index.cfm?fuseaction=user", NULL }
};
- const gchar *froms[ARRAY_LENGTH(message_types) + 1] = { "" },
- *tos[ARRAY_LENGTH(message_types) + 1] = { "" },
- *urls[ARRAY_LENGTH(message_types) + 1] = { "" },
- *subjects[ARRAY_LENGTH(message_types) + 1] = { "" };
+ const gchar *froms[G_N_ELEMENTS(message_types) + 1] = { "" },
+ *tos[G_N_ELEMENTS(message_types) + 1] = { "" },
+ *urls[G_N_ELEMENTS(message_types) + 1] = { "" },
+ *subjects[G_N_ELEMENTS(message_types) + 1] = { "" };
g_return_if_fail(reply != NULL);
@@ -886,7 +886,7 @@ msim_check_inbox_cb(MsimSession *session, const MsimMessage *reply, gpointer dat
n = 0;
- for (i = 0; i < sizeof(message_types) / sizeof(message_types[0]); ++i) {
+ for (i = 0; i < G_N_ELEMENTS(message_types); ++i) {
const gchar *key;
guint bit;