diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2012-01-24 09:52:25 -0500 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-02-09 08:28:51 -0500 |
commit | fa525622e33216207b6bba6ef5b4c434d565e4d1 (patch) | |
tree | dd878960fb361a6fde4aef1d2f0c4dfe76f7efa5 | |
parent | 10eefa49470d97948719f58dfb62a97fb4701aed (diff) |
wayland-util.h: Avoid un-namespaced _container_of
Yes, there are worse offenders in that file, but this one isn't used in
the code and it makes Xorg angry.
-rw-r--r-- | src/wayland-util.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/wayland-util.h b/src/wayland-util.h index f56af59..25c0901 100644 --- a/src/wayland-util.h +++ b/src/wayland-util.h @@ -107,32 +107,32 @@ int wl_list_empty(struct wl_list *list); void wl_list_insert_list(struct wl_list *list, struct wl_list *other); #ifdef __GNUC__ -#define __container_of(ptr, sample, member) \ +#define __wl_container_of(ptr, sample, member) \ (__typeof__(sample))((char *)(ptr) - \ ((char *)&(sample)->member - (char *)(sample))) #else -#define __container_of(ptr, sample, member) \ +#define __wl_container_of(ptr, sample, member) \ (void *)((char *)(ptr) - \ ((char *)&(sample)->member - (char *)(sample))) #endif #define wl_list_for_each(pos, head, member) \ - for (pos = 0, pos = __container_of((head)->next, pos, member); \ + for (pos = 0, pos = __wl_container_of((head)->next, pos, member); \ &pos->member != (head); \ - pos = __container_of(pos->member.next, pos, member)) + pos = __wl_container_of(pos->member.next, pos, member)) #define wl_list_for_each_safe(pos, tmp, head, member) \ for (pos = 0, tmp = 0, \ - pos = __container_of((head)->next, pos, member), \ - tmp = __container_of((pos)->member.next, tmp, member); \ + pos = __wl_container_of((head)->next, pos, member), \ + tmp = __wl_container_of((pos)->member.next, tmp, member); \ &pos->member != (head); \ pos = tmp, \ - tmp = __container_of(pos->member.next, tmp, member)) + tmp = __wl_container_of(pos->member.next, tmp, member)) #define wl_list_for_each_reverse(pos, head, member) \ - for (pos = 0, pos = __container_of((head)->prev, pos, member); \ + for (pos = 0, pos = __wl_container_of((head)->prev, pos, member); \ &pos->member != (head); \ - pos = __container_of(pos->member.prev, pos, member)) + pos = __wl_container_of(pos->member.prev, pos, member)) struct wl_array { uint32_t size; |