Commit 68a63466 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix VLC_OBJECT expansion

parent 733940c8
......@@ -533,12 +533,14 @@ typedef union
#if defined( __GNUC__ ) && __GNUC__ > 3
# ifndef __cplusplus
# define VLC_OBJECT( x ) \
__builtin_choose_expr(__builtin_offsetof(__typeof__(*x), psz_object_type), \
(void)0 /* screw you */, (vlc_object_t *)(x))
__builtin_choose_expr( \
__builtin_offsetof(__typeof__(*(x)), psz_object_type), \
(void)0 /* screw you */, \
(vlc_object_t *)(x))
# else
# define VLC_OBJECT( x ) \
((vlc_object_t *)(x) \
+ 0 * __builtin_offsetof(__typeof__(*x), psz_object_type))
+ 0 * __builtin_offsetof(__typeof__(*(x)), psz_object_type))
# endif
#else
# define VLC_OBJECT( x ) ((vlc_object_t *)(x))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment