[vlc-devel] [RFC] Send warning on bad vlc_object_(hold|warning) usage
Rémi Denis-Courmont
remi at remlab.net
Wed Sep 16 11:23:07 CEST 2009
On Wed, 16 Sep 2009 10:14:35 +0200, Pierre d'Herbemont
<pdherbemont at gmail.com> wrote:
> As discussed on this mailing list, this API is working on a subclass
> basis, and only hold the vlc_object_t data, and may return invalid
> subclass data.
Holding or releasing a sub-classed object is perfectly valid. Changing the
return type of _hold looks OK to me, but not the rest.
Ideally, we would kill VLC_COMMOM_MEMBERS, and include the vlc_object_t
structure into each and every object class. That would be the same pattern
as, e.g., Linux kernel objects, or VLC garbage collector. Then, we could
actually fix the VLC_OBJECT() macro. It currently fails to ensure that
VLC_COMMOM_MEMBERS is at the right offset (zero) from the cast pointer. I
have no time for this though.
--
Rémi Denis-Courmont
More information about the vlc-devel
mailing list