X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1fc042e8bc9c51f9267fa1936deaebe59ae01ee7..70fa17187e0b928ff89cb8663426edbf6b74601a:/src/bindings/lua/lua_private.hpp diff --git a/src/bindings/lua/lua_private.hpp b/src/bindings/lua/lua_private.hpp index e51fae30fd..abcfd7070f 100644 --- a/src/bindings/lua/lua_private.hpp +++ b/src/bindings/lua/lua_private.hpp @@ -19,14 +19,16 @@ msg_host_t sglua_check_host(lua_State* L, int index); void sglua_register_platf_functions(lua_State* L); const char* sglua_get_msg_error(msg_error_t err); - } -#define lua_ensure(...) \ - _XBT_IF_ONE_ARG(_lua_ensure_ARG1, _lua_ensure_ARGN, __VA_ARGS__)(__VA_ARGS__) -#define _lua_ensure_ARG1(cond) \ - _lua_ensure_ARGN(cond, "Assertion %s failed", #cond) -#define _lua_ensure_ARGN(cond, ...) \ - do { if (!(cond)) { luaL_error(L, __VA_ARGS__); return -1;} } while (0) +#define lua_ensure(...) _XBT_IF_ONE_ARG(_lua_ensure_ARG1, _lua_ensure_ARGN, __VA_ARGS__)(__VA_ARGS__) +#define _lua_ensure_ARG1(cond) _lua_ensure_ARGN(cond, "Assertion %s failed", #cond) +#define _lua_ensure_ARGN(cond, ...) \ + do { \ + if (!(cond)) { \ + luaL_error(L, __VA_ARGS__); \ + return -1; \ + } \ + } while (0) #endif