lua-users home
lua-l archive

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


I would like to see:
 #define real float
...moved to Lua.h as Lua.h is included in files using the Lua interface
which may require the lua number type.

Could it be made a typedef?

Could it be given a more meaningful name, eg. lua_real or lua_number ? i.e.
because it might be used "outside" Lua.

typedef float lua_number;

Could you please cast all numbers that are used,
e.g.
lua_pushnumber((lua_number)(strlen("abc"));
lua_pushnumber((lua_number)sin(whatever));
There are lots of warnings during compilation in Lua and the libraries. It
doesn't always cause problems, but can sometimes and anyway it should be a
clean build! :-)

Could all the client libraries use lua_number as the local type instead of
float or double. e.g. min and max.

If all this was done it would be very easy to change Lua between float and
double, and easier to change to int.

Ta,
Nick.