[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Calling Lua from C
- From: Rici Lake <lua@...>
- Date: Sat, 8 Oct 2005 23:55:27 -0500
On 8-Oct-05, at 9:28 PM, Chris wrote:
Right, I have Lua compiled with USE_LONG so I'm not using floats.
However, that's a good catch because if I switch the printf to a float
it seems to be correct (the 5 is due to the float encoding).
So the question is, why am I getting a float instead of a long?
I can only guess, but my guess is that either you haven't got a
consistent build environment. For example, you might have built your
app with USE_LONG, but with a library compiled with normal doubles. Or
you might have built the library with USE_LONG, but not defined
LUA_NUMBER before you #include <lua.h> in your application. Or some
variation on those themes.