[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Lua x DirectX
- From: roberto@... (Roberto Ierusalimschy)
- Date: Wed, 15 Mar 2006 13:51:39 -0300
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?)