[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 20:01:24 CEST 2009


2009/6/10 Rémi Denis-Courmont <remi at remlab.net>:
> Le mercredi 10 juin 2009 20:10:36 Laurent Aimar, vous avez écrit :
>> On Tue, Jun 09, 2009, git version control wrote:
>> > vlc | branch: 1.0-bugfix | Pierre d'Herbemont <pdherbemont at free.fr> | Mon
>> > May 25 03:42:10 2009 -0700| [59c79c740cf3517b7fa96ebd0e4f98d950352102] |
>> > committer: Pierre d'Herbemont
>> >
>> > libvlc: Don't use enum directly, it's a bad pratice for ABI compat.
>>
>>  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.

Pierre.



More information about the vlc-devel mailing list