[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua x DirectX
- From: Adrian Sietsma <adrian_groups@...>
- Date: Sat, 18 Mar 2006 02:42:08 +1100
Roberto Ierusalimschy wrote:
It seems that too many people are having problems with this DirectX issue.
How can we solve that??
- Some people suggested adding some warning in the manual. Would this
really help? I mean, if you find an unexpected bug in a program, where
will you search for help? In the manual? In what section?
- Another option would be to simply turn off the offending macro
(lua_number2int) in Windows. This will slow down Lua a bit... Of
course, anyone is free to use it, but the default would avoid the
problem. (Doesn't Windows offer lrint? Could we use it instead?)
- Other option would be to add a check somewhere in the code, so
that this situation is detected early and gives a proper error message.
(Unfortunately, the test cannot be when creating a Lua state, because
there is no way to return an error message. Maybe when loading a chunk?)
As a minimum, can we add a test in the debug library, maybe on load ?
Also maybe set/get FPW functions there ?