[vlc-devel] [PATCH 2/3] display: add macro to set the callbacks and check type of the Open/Close

Rémi Denis-Courmont remi at remlab.net
Mon Jul 15 17:25:07 CEST 2019


Le maanantaina 15. heinäkuuta 2019, 17.06.29 EEST Steve Lhomme a écrit :
> On 2019-07-15 15:03, Rémi Denis-Courmont wrote:
> > Hi,
> > 
> > I don't think that'll work if there are submodules with different
> > open/close callbacks. Possibly this never happens yet, but that is going
> > to be a PITA to debug if it ever does occur.
> add_submodule() just calls a VLC_MODULE_CREATE. Every vlc_plugin_set()
> call after that ends up in the submodule.
> 
> So
>      set_callbacks(activate, deactivate);
> 
> Should be the same as
>      {
>          set_callbacks(activate, deactivate);
>      }
> 
> They both do
> vlc_module_set(VLC_MODULE_CB_OPEN, #activate, (void *)(activate))
> vlc_module_set(VLC_MODULE_CB_CLOSE, #deactivate, (void *)(deactivate)))

Current code does:

vlc_module_set(VLC_MODULE_CB_OPEN, "Open", (void *)(Open))

while this patch does:

vlc_module_set(VLC_MODULE_CB_OPEN, "open__", (void *)(open__))

Those do not look the same to me.

-- 
レミ・デニ-クールモン
http://www.remlab.net/





More information about the vlc-devel mailing list