[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Using integers instead of floats with Lua 5.0.2
- From: "Kevin Baca" <lualist@...>
- Date: Thu, 4 Nov 2004 15:15:55 -0800
I'm using 5.1-work0. These are the #defines I changed:
#define LUA_NUMBER int
#define LUA_INTEGER int
#define LUA_NUMBER_SCAN "%d"
#define LUA_NUMBER_FMT "%d"
#define lua_str2number(s,p) strtol((s), (p), 10)
-Kevin
> -----Original Message-----
> From: lua-bounces@bazar2.conectiva.com.br
> [mailto:lua-bounces@bazar2.conectiva.com.br] On Behalf Of
> Zachary Landau
> Sent: Thursday, November 04, 2004 2:43 PM
> To: lua@bazar2.conectiva.com.br
> Subject: Using integers instead of floats with Lua 5.0.2
>
>
> Hello,
>
> I am in the process in bringing Lua up on a Coldfire board with no
> FPU. By changing the NUMBER= line in the lua 'config' file I was able
> to compile Lua with support for using integers instead of floats,
> which helped a lot.
>
> Has anyone else done this with a recent version of Lua? I'm wondering
> if it causes any problems with lua itself, as well as any popular
> extentions.
>
> Specifically, LuaSocket does not seem to be too happy about it. For
> example, when I tell it to bind to a port using 'socket.bind("*",
> 1234)' it claims it is listening on port 1084769792, which seems a bit
> high for a port number. The problem showed up in other places, like
> socket.time(), as well.
>
> If anyone has some advice for making lua and friends play nicely with
> integers, please let me know.
>
> --
> Zachary P. Landau <kapheine@gmail.com>
>