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

Rémi Denis-Courmont remi at remlab.net
Sun Jul 14 10:00:36 CEST 2019

Le perjantaina 12. heinäkuuta 2019, 9.27.58 EEST Steve Lhomme a écrit :
> My point is that right now we have no warning (let alone errors) on
> callbacks and its bad.

I think everybody agrees that there should be (at least) warnings.
It's easy to do with an identity function:

static inline void *foobar(vout_display_open_cb cb) { return cb; }

#define set_vout_display_callbacks(x,y) set_callbacks(foobar(x), y)

I think the close callback should be moved out of the plugin descriptor with 
the other callbacks (than open), anyway. That would make the issue moot.

Rémi Denis-Courmont

More information about the vlc-devel mailing list