aboutsummaryrefslogtreecommitdiffstats
path: root/src/wayland-private.h
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2012-10-19 17:08:38 -0400
committerKristian Høgsberg <krh@bitplanet.net>2012-10-19 17:08:38 -0400
commitbdd272f024744b4ed5ba6daedef7eb023bcac7cb (patch)
tree61725e939ace9d69f52ddb6cc0f610e525a878b9 /src/wayland-private.h
parentconfigure: Depend on a more strict version of publican (diff)
downloadwayland-bdd272f024744b4ed5ba6daedef7eb023bcac7cb.tar
wayland-bdd272f024744b4ed5ba6daedef7eb023bcac7cb.tar.gz
wayland-bdd272f024744b4ed5ba6daedef7eb023bcac7cb.tar.bz2
wayland-bdd272f024744b4ed5ba6daedef7eb023bcac7cb.tar.lz
wayland-bdd272f024744b4ed5ba6daedef7eb023bcac7cb.tar.xz
wayland-bdd272f024744b4ed5ba6daedef7eb023bcac7cb.tar.zst
wayland-bdd272f024744b4ed5ba6daedef7eb023bcac7cb.zip
Move ARRAY_LENGTH out of public headers
Exporting unprefixed symbols is a pretty bad idea so don't do that. Instea of redefining it WL_ARRAY_LENGTH, we just move the define to our private header. The scanner generates code that uses ARRAY_LENGTH, but we can just make it count the number elements and emit an integer constant instead.
Diffstat (limited to 'src/wayland-private.h')
-rw-r--r--src/wayland-private.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wayland-private.h b/src/wayland-private.h
index 8adee9f..0d617a7 100644
--- a/src/wayland-private.h
+++ b/src/wayland-private.h
@@ -28,6 +28,8 @@
#include <ffi.h>
#include "wayland-util.h"
+#define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0])
+
#define WL_ZOMBIE_OBJECT ((void *) 2)
#define WL_MAP_SERVER_SIDE 0