lua-users home
lua-l archive

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

You might be interested in an int32 patch I did for Lua 5.1 lately. It is totally transparent to applications, but stores integers as such internally. Thus, it sort-of brings the best of both worlds, you can have floats, but you don't need to compromise on integer range, or performance, if you do.

As well known, using only floats will reduce integer accuracy to 23 bits (float mantissa). After that, the numbers will start losing their lowest bits.


31.3.2005 kello 14:48, DC kirjoitti:

 Julien MARBACH wrote:
Hello there,
I would like to build lua for uClinux. I've searched this mailing list archive and found that the subject have been once discussed but it hasn't resolved my problem. I have to modify the lua makefile to make it ucLinux-compatible i. e. change the compiler to m68k-elf-gcc, change libC to ucLibc ...
If anybody has ever done it, any help would be welcome.

I just did this for with 5.1 work 5. Only changes were to lua/src/Makefile:

CC = arm-elf-gcc
AR = arm-elf-ar rcu
RANLIB = arm-elf-ranlib

I also changed LUA_NUMBER from double to int.