Re: [AD] WIP 4.1.15 and CVS freeze

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


> > How come "unsigned int" instead of "unsigned long"?
> > 
> 
> Well, int just seemed to make more sense. Isn't long the same on the
> common platforms anyway? I changed it to unsigned long in the first
> patch actually, but Chris suggested "unsigned int" - and when thinking
> about that it seemed to make more sense to me.

What's the libc way to handle this? If typical rest-like functions in the
standard library take ints, then I think we should also use ints. If they take
longs, then taking longs for Allegro would be proper too.

If there's no consensus on this, then the type should remain the same as it is
now (but possibly unsigned) in my opinion. Not for API breakage but
theoretically possible ABI breakage on some compilers. I doubt it's a real issue
though.

> Hm, don't know. I guess, where negative values make no sense, we should
> use unsigned. I just thought about changing rest while working on it.

I think unsigned/signed correctness is like const correctness and would be a
good thing to have. The usage of size_t rather than int for items that take the
size of, say, an array would be along the same lines, and this is already on the
TODO list.

Evert




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