[vlc-devel] [PATCH] libvlc: replace existing title menu bool with int bit mask

Steve Lhomme robux4 at gmail.com
Mon Dec 21 08:10:24 CET 2015

On Fri, Dec 18, 2015 at 4:55 PM, Hugo Beauzée-Luyssen <hugo at beauzee.fr> wrote:
> On 12/18/2015 04:38 PM, Felix Paul Kühne wrote:
>>> On 18 Dec 2015, at 16:28, Francois Cartegnie <fcvlcdev at free.fr> wrote:
>>> Le 18/12/2015 15:29, Felix Paul Kühne a écrit :
>>>> -    bool b_menu; /**< info if item was recognized as a menu by the
>>>> demuxer */
>>>> +    int i_flags; /**< info if item was recognized as a menu,
>>>> interactive or plain content by the demuxer */
>>> Sign makes no sense, except if you want to raise warnings matching with
>>> 0x80000000
>> Indeed. This would also match the i_flags for libvlc_media, which is
>> unsigned also.
> If you want to store the masks as an enum you won't be able to use values
> above 0x7FFFFFFF since they have to fit in a signed int, so I'd argue signed
> makes sense here, provided the masks are exposed as enum members.

Would the compiler(s) issue an error if a value ends up out of range
of an enum ?

Other than that, if the field is only used for bitfield operations, it
shouldn't matter if the last bit is a sign or not.

More information about the vlc-devel mailing list