X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/14f459baf40f29906d54d3bd5774cda34aeadd76..a15797ea55151ddfdbae48147e74159efe01b411:/src/bindings/lua/simgrid_lua.cpp diff --git a/src/bindings/lua/simgrid_lua.cpp b/src/bindings/lua/simgrid_lua.cpp index ce5fed9bc4..61fcd2f84e 100644 --- a/src/bindings/lua/simgrid_lua.cpp +++ b/src/bindings/lua/simgrid_lua.cpp @@ -8,19 +8,15 @@ #include "lua_private.h" #include "lua_utils.h" -#include "xbt.h" -#include "simgrid/msg.h" -#include "simgrid/simdag.h" -#include "surf/surfxml_parse.h" +#include "src/surf/xml/platf.hpp" -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(lua, bindings, "Lua Bindings"); +XBT_LOG_NEW_DEFAULT_CATEGORY(lua, "Lua Bindings"); extern "C" { #include int luaopen_simgrid(lua_State *L); -static void sglua_register_c_functions(lua_State *L); } /* ********************************************************************************* */ @@ -115,24 +111,6 @@ static const luaL_Reg simgrid_functions[] = { /* module management functions */ /* ********************************************************************************* */ -/** - * \brief Opens the simgrid Lua module. - * - * This function is called automatically by the Lua interpreter when some - * Lua code requires the "simgrid" module. - * - * \param L the Lua state - */ -int luaopen_simgrid(lua_State *L) -{ - XBT_DEBUG("luaopen_simgrid *****"); - - sglua_register_c_functions(L); - - return 1; -} - - /** * \brief Makes the core functions available to the Lua world. * \param L a Lua world @@ -146,12 +124,20 @@ static void sglua_register_core_functions(lua_State *L) } /** - * \brief Creates the simgrid module and make it available to Lua. - * \param L a Lua world + * \brief Opens the simgrid Lua module. + * + * This function is called automatically by the Lua interpreter when some + * Lua code requires the "simgrid" module. + * + * \param L the Lua state */ -static void sglua_register_c_functions(lua_State *L) +int luaopen_simgrid(lua_State *L) { + XBT_DEBUG("luaopen_simgrid *****"); + sglua_register_core_functions(L); sglua_register_host_functions(L); sglua_register_platf_functions(L); + + return 1; }