[vlc-devel] commit: libvlc: Don't use enum directly, it's a bad pratice for ABI compat. (Pierre d'Herbemont )

Pierre d'Herbemont pdherbemont at free.fr
Wed Jun 10 21:54:03 CEST 2009


2009/6/10 Rémi Denis-Courmont <remi at remlab.net>:
> Le mercredi 10 juin 2009 21:01:24 Pierre d'Herbemont, vous avez écrit :
>> 2009/6/10 Rémi Denis-Courmont <remi at remlab.net>:
>> >>  Are you sure that this change does not break the ABI ?
>> >> (I think there is other enum change like that one) ?
>> >
>> > That depends on the calling convention.
>> > In other words, it does break the ABI.
>>
>> Yes, the change might break the ABI. Yet there might be no constance
>> over compiler in this case, so no real solid ABI.
>>
>> The problem (as pointed) with directly using enum is that certain
>> compiler option could end up shorten the enum at convenience.
>>
>> Laurent is right, if there are other occurrence of this kind of direct
>> enum usage, we might want to get rid of those.
>
> Look, either we agree that 1.0 is compatible with 0.9 and we revert this crap.
> Or we agree that it is not and the ABI number is bumped and we do backport all
> the fixes from 1.1. There is no being "somewhat" compatible.

This "crap" is the right way to go. Else you end up in the "somewhat"
compatible ABI you are talking about. (-fshort-enums would break it)

But you are right, we need to agree on bumping the ABI version.
Easiest way is to revert. And I would go for it, I didn't realize we
didn't bump the version for 1.0. And I should have thought about
bumping the version anyway for that change, even though this shouldn't
break.

Pierre.



More information about the vlc-devel mailing list