Commits on Source (2)
-
intf_thread_t wasn't forward-declared and was available only thanks to vlc_object_cast forward declaration.
84016b14 -
Like done by _Generic in the C version, use overloading functions to define the correct casting behaviour depending on whether the pointer is already a vlc_object_t or possess a vlc_object_t as ->obj. This removes the need for listing all the objects which need a casting case, and non-vlc_object_t objects will fail with the following error: include/vlc_objects.h: In instantiation of ‘vlc_object_t* VLC_OBJECT(T*) [with T = {anonymous}::demux_sys_t; vlc_object_t = vlc_object_t]’: include/vlc_objects.h:83:18: error: ‘struct {anonymous}::demux_sys_t’ has no member named ‘obj’ or, if there is a obj field which is not a vlc_object_t: include/vlc_objects.h: In instantiation of ‘vlc_object_t* VLC_OBJECT(T*) [with T = Open(vlc_object_t*)::foo; vlc_object_t = vlc_object_t]’: include/vlc_objects.h:83:18: error: cannot convert ‘Open(vlc_object_t*)::foo::obj*’ to ‘vlc_object_t*’ in return 83 | { return &d->obj; } | ~~~^~~ | | | Open(vlc_object_t*)::foo::obj*
3a526cb3