Re: [AD] Indexed datafiles

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Thu, 2006-01-05 at 17:05 +0100, Elias Pschernig wrote:

> Aha, so forward compatibility after all, just not strict. Well, what
> about a function: get_allegro_version(int *a, int *b, int *c)
> 
> Then if you want to use e.g. the list_config_entries function, you would
> do:
> 
> get_allegro_version(&a, &b, &c);
> if (!(a >= 4 && b >= 2 && c >= 1))
>    abort_with_error("Need at least Allegro 4.2.1 DLL.\n");
> 
> And otherwise, it would run even with the 4.2.0 DLL.
> 

But then, if you want to support different versions at compile time, it
gets complicated.. so my vote would be to apply the patch, since I think
having simple checks at compile time (using ALLEGRO_VERSION,
ALLEGRO_SUB_VERSION, ALLEGRO_WIP_VERSION) to see if a function is
available should be enough. Introducing another function to get the
runtime version just will be confusing with the only benefit that you
can use an old DLL to run a new program, something that's hardly useful.

-- 
Elias Pschernig





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/