lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Fri, Jun 19, 2009 at 10:08 AM, Hans van der Meer<H.vanderMeer@uva.nl> wrote:
> I would plea for using a typedef here too. Especially because int is
> notouriously "vague" and its size can vary from system to system. It does
> not matter too much what representation is chosen, as long as it is
> adaptable in luaconf.h
> Hans van der Meer

If your argument was that a typedef would make the API clearer with
regard to which arguments are stack indicies, and which are are ints
with other purposes, then I could agree with you. I do not see why int
being a "vague" type is an argument against its use though. At least
in 5.1, Stack indicies are only in the range [-11000, +11000], which
will all fit easily into even a 16 bit integer.