Re: [Exim] local_scan api version proposal

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Marc MERLIN
Datum:  
To: Philip Hazel, Exim-users, Dr Andrew C Aitchison, Nico Erfurth
Alte Treads: Pedantic documentation addition Re: [Exim] local_scan api version proposal
Betreff: Re: [Exim] local_scan api version proposal
On Sun, Mar 16, 2003 at 08:53:13AM +0000, Dr Andrew C Aitchison wrote:
> On Sat, 15 Mar 2003, Marc MERLIN wrote:
>
> > I'll attach the whole patch (not that long) that I revised to support
> > a local_scan API version number which looks like x.y
> > x -> major number, only gets increased if API is changed in a non
> >      backwards compatible way
> > y -> minor number, gets increased every time you add features of the API

> >
> > Goal:
> > if a module's x is lower than exim's then exim knows that the module
> > was build for an older, incompatible version of the API, and won't run
> > it.
> > If
> -- insert --
> the module's x is higher than exim's, or
> -- end insert --
> > both x are equal but the module's y is higher than exim's, it means that
> > the module was built against an exim that had more features in the API
> > than the current running one, and that therefore it's not safe to run
> > the module either.


Right, I was a bit tired when I wrote this. My code first checked for
both x being different, which meant that in the second case, they had to
be equal and we only cared about y.
I'll rework the wording, thanks.

On Sun, Mar 16, 2003 at 10:03:49AM +0100, Nico Erfurth wrote:
>
> On Sat, 15 Mar 2003, Marc MERLIN wrote:
>
> > x -> major number, only gets increased if API is changed in a non
> >      backwards compatible way
> > y -> minor number, gets increased every time you add features of the API

> >
> > +#define LOCAL_SCAN_ABI_VERSION 1.0
>
> May I suggest to change to for more easier checking?
>
> #define LOCAL_SCAN_ABI_VERSION_MAJOR 1
> #define LOCAL_SCAN_ABI_VERSION_MINOR 0
> #define LOCAL_SCAN_ABI_VERSION \
> LOCAL_SCAN_ABI_VERSION_MAJOR.LOCAL_SCAN_ABI_VERSION_MINOR
>
> This allows easy compiletime-checking to make a patch work with different
> ABIs.


That's a good point, thanks.

I'll wait for Philip's answer, and if he is ok with maintaining those
two numbers in the exim source, I'll go with the scheme you proposed.

Marc
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/   |   Finger marc_f@??? for PGP key