diff --git a/code/ryzom/client/src/interface_v3/lua_helper.cpp b/code/ryzom/client/src/interface_v3/lua_helper.cpp index 80a275523..bd01d42f9 100644 --- a/code/ryzom/client/src/interface_v3/lua_helper.cpp +++ b/code/ryzom/client/src/interface_v3/lua_helper.cpp @@ -26,15 +26,20 @@ #endif -extern "C" -{ -#include "lualib.h" -} +#include "lua_loadlib.h" // to get rid of you_must_not_use_assert___use_nl_assert___read_debug_h_file messages #include -#undef assert -#define assert nlassert +#ifdef assert + #undef assert +#endif + +#ifdef NL_DEBUG + #define assert(x) nlassert(x) +#else + #define assert(x) +#endif + #include using namespace std; diff --git a/code/ryzom/client/src/interface_v3/lua_ihm.cpp b/code/ryzom/client/src/interface_v3/lua_ihm.cpp index 2b9752b52..b43c7f4ba 100644 --- a/code/ryzom/client/src/interface_v3/lua_ihm.cpp +++ b/code/ryzom/client/src/interface_v3/lua_ihm.cpp @@ -28,8 +28,16 @@ // to get rid of you_must_not_use_assert___use_nl_assert___read_debug_h_file messages #include -#undef assert -#define assert nlassert +#ifdef assert + #undef assert +#endif + +#ifdef NL_DEBUG + #define assert(x) nlassert(x) +#else + #define assert(x) +#endif + #include // in luabind > 0.6, LUABIND_MAX_ARITY is set to 10 #if LUABIND_MAX_ARITY == 10 diff --git a/code/ryzom/client/src/interface_v3/lua_loadlib.h b/code/ryzom/client/src/interface_v3/lua_loadlib.h index 32907d096..b68ed94fd 100644 --- a/code/ryzom/client/src/interface_v3/lua_loadlib.h +++ b/code/ryzom/client/src/interface_v3/lua_loadlib.h @@ -17,9 +17,12 @@ #ifndef LUA_LOADLIB_H #define LUA_LOADLIB_H -#include "lua.h" -#include "lauxlib.h" -#include "lualib.h" +extern "C" +{ +#include +#include +#include +} // load the lua dll, return 1 on success //int loadLuaDLL();