When wrapping c++ for use in Lua, macros of type '#define FOO true' aren't initialized by swig. Therefore Lua doesn't register them and <module-name>.FOO is 'nil'.
Now fixed in svn. true and false are recognised and any constant expression using true and false are now wrapped (C++ only of course), eg:
#define FOO true
#define BAR true && FOO
This is a general issue applicable to all languages.