RE: [AD] to prefix or not to prefix (part 2)

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


Title: RE: [AD] to prefix or not to prefix (part 2)

> >  (II) Replace the routines entirely by routines that also take
> >       the extra source_x,source_y,width,height arguments, as
> >       in blit() and masked_blit(). This will probably not give
> >       the same problems as (I), because the compiler will give
> >       an error if you use the routines the old way. It might
> >       require somewhat bigger changes in Allegro, but the
> >       low-level routines apparently support this already because
> >       they support sub-bitmaps and clipping.
>
> i agree that it must be changed the (d,s in (s,d
> but adding useless parameters to functions that don't need'em is not
> good. or maybe we could do that, but we should also add some macros
> without the useless parameters.

Anyway, if the instructions for upgrading a put in a prominent place,
and they bear the note that these functions' parameters were swapped,
then all should be OK. There is no risk of a compiler not catching
an error, since the name changes, and so the programmer knows where
are all the calls to the swapped-args function are. Thus, swapping
parameters seems OK, as long as the function name changes. No need for
a second API entry.
Of course, this means that any automated tool do not replace this
particular function name in sources. Though, it could add a small
comment stating that this particular function had its args swapped.

--
Vincent Penquerc'h



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