[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: FW: Lua on mobile phone
- From: "Daniel Collins" <daniel.collins@...>
- Date: Fri, 3 Mar 2006 10:52:56 +1030
> > I think it should be simple to provide my own custom allocator
> This is trivial in 5.1 and pretty simple in 5.0
> (you have to change 2 macros in lmem.c and recompile).
> > Some mobile phone platforms don't provide a complete C standard
> > library.
> The Lua core tries to avoid as much as possible of the C
> standard library. Not so with the Lua libraries, though...
I don't know if I need all the libraries anyway, and I find it pretty
easy to provide my own functions with the same signature as the std
library functions, then using a macro to redefine the std lib names so
my functions are called instead.
> > I guess it is possible to replace all double usage with equivalent
> > fixed point operations.
> This is simple in 5.1 because there are macros for all
> numeric operations. In 5.0 (and also in 5.1) you cal compile
> Lua to use int instead of double, though I'm not sure that'd
> fit your needs. --lhf
The jury is still out on this one. I am tempted to change the lua core
to integer only and then provide fixed point as a library for use when
needed. But if the numeric ops are all in macros, perhaps it will be
simple to make the intrinsic math operations be fixed point. I think I
just need to test both ideas.