On Mon, Nov 18, 2024 at 09:17:48AM +0100, Remi Collet wrote:
> Le 16/11/2024 à 22:46, Peter Pentchev a écrit :
>
> > Hm, ICBW, but, at least to me, this enum change looks like an actual
> > breaking ABI (not API) change. If a program was compiled to call that
> > function with the SentinelFilter value, the program code would pass
> > 32 as a parameter and invoke the function. If loaded with the new
> > version of the library, this would cause the function to assume that
> > the caller wanted to pass MagicKernelSharp2013Filter and... do something
> > unexpected.
>
> No, SentinelFilter is a special value keeping track of first free value
> A program will never use this in an arg call (OK name is confusing)
>
> Typical usage
>
> if (filter < SentinelFilter) {
> SetResampleFilter(RF, filter);
> } else {
> printf("Bad filter value\n");
> exit(1);
> }Ahh, okay. Thanks a lot for the explanation! This only leaves one possible case for confusion: a user of the library that somehow sees a now-valid value and compares it against their "remembered" value for SentinelFilter, e.g. a callback or something. But this seems to be a bit of a reach, so yeah, thanks again for clearing this up, and sorry for stepping in uninformed :) > Notice: the bad map change have been reverted, > so 7.1.1-41 is OK with same ABI than 7.1.1-39 G'luck, Peter -- Peter Pentchev [email protected] [email protected] [email protected] PGP key: https://www.ringlet.net/roam/roam.key.asc Key fingerprint 2EE7 A7A5 17FC 124C F115 C354 651E EFB0 2527 DF13
signature.asc
Description: PGP signature
-- _______________________________________________ devel mailing list -- [email protected] To unsubscribe send an email to [email protected] Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/[email protected] Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
