Re: [AD] WIP 4.1.15 and CVS freeze

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


Peter Wang wrote:
Does this mean more argument/return types will become unsigned in future? I reckon unsigned-ness can be a bitch to work with.

I personally think it should work like this: all argument/return types are signed by default. However, if you need the extra bit for larger positive numbers, or in cases where having negative numbers would break something (like underflowing an overflowed number to achieve a proper result), then it should be unsigned. That and pointer casts (which falls into #2 if you're going to be doing math on them, really).

The "unsigned" keyword is just too long, and yet it feels gratuitous to typedef unsigned int uint.

For Unix this would be easy.. just do a configure check for C99 typedefs and, if not present, make some wrapper defines to map them to known proper-size types. Though I would have no idea how to solve this on Windows, DOS, or wherever else you can't run a configure check.. perhaps just a static define list for those?

- Kitty Cat




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