changeset 26940:88f1db1da582

merge of 'd1fea663a03e5f80f539918a21f5f36c09a452b8' and 'f936cb2a5d4eb080fa7be1ee1b6599c98e9e12f4'
author Ka-Hing Cheung <khc@hxbc.us>
date Sun, 10 May 2009 22:24:37 +0000
parents 55a8fe9d8247 (diff) 657d42e865dd (current diff)
children ef61a2b746bd c69a2e88fee3
files
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/internal.h	Sun May 10 22:07:22 2009 +0000
+++ b/libpurple/internal.h	Sun May 10 22:24:37 2009 +0000
@@ -256,6 +256,10 @@
 
 #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. */