lua-users home
lua-l archive

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


>  I think I've got this right, but it seems there have been a lot of changes
> since 5.0 so I want to check.  To change over Lua to use floats I changed
> the following lines in luaconf.h:
> 
> #define LUA_NUMBER		float
> #define LUA_NUMBER_SCAN		"%f"
> #define LUA_NUMBER_FMT		"%g"

This is essentially what is in lua-5.0.2/etc/luser_number.h.

> #define LUA_UACNUMBER		float
> #define LUSER_ALIGNMENT_T	union { float u; void *s; long l; }

Here I think you should leave double as it was unless you're sure
the maximum alignment of anything you need is that of float. I think
LUSER_ALIGNMENT_T is used for memory allocated with lua_newuserdata.
--lhf