[vlc-devel] [PATCH 01/15] display: make vd->owner a const pointer

Steve Lhomme robux4 at ycbcr.xyz
Thu Sep 3 17:11:31 CEST 2020


On 2020-09-03 16:20, Rémi Denis-Courmont wrote:
> Le torstaina 3. syyskuuta 2020, 8.52.18 EEST Steve Lhomme a écrit :
>> No need to make it writable to modules.
> 
> vd->owner is writable either way. This won't prevent a clueless developer from
> doing bad things.

You can change the pointer but the content of the pointed struct. It's 
more about readability of what the display module is supposed/allowed to 
do with the structure it has access to. It's more obvious in the other 
patches.

The display module wouldn't even know about the owner if 
vout_display_SendEventViewpointMoved() wasn't inline.

> This also breaks consistency with owner structures embedded in other object
> typyes such as filter and window, and adds a pointer and level of indirection
> for essentially nothing.
> 
> Just like you removed vout->p, I don't think we should do this.
> 
> -- 
> Rémi Denis-Courmont
> http://www.remlab.net/
> 
> 
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
> 


More information about the vlc-devel mailing list