Re: [AD] SF.net SVN: alleg:[11393] allegro/branches/4.9

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


On 2009-01-06, Thomas Fjellstrom <tfjellstrom@xxxxxxxxxx> wrote:
> On January 6, 2009, Evert Glebbeek wrote:
> > On 6-Jan-09, at 11:16 AM, Thomas Fjellstrom wrote:
> > >>> fix al_path_exists return type
> > >>
> > >> Shouldn't it return bool rather than int32_t?
> > >
> > > Only if booleans can store three values.
> >
> > Yes/no/maybe?
> > A path either exists, or it doesn't, right? Why do you need three
> > return values?
> 
> As the code says, 1 for true, 0 for false, -1 on error.

We also need to replace int32_ts in the path and fshook code by plain
int.  Using int32_t indiscriminately hides the places where a variable
*actually* needs to be exactly 32-bits wide, or if it's 32-bits "just
because" (i.e. no reason at all).

Peter





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