Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
lua: inline a function
authorMartin Quinson <martin.quinson@loria.fr>
Sun, 27 Mar 2016 15:13:42 +0000 (17:13 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sun, 27 Mar 2016 15:13:42 +0000 (17:13 +0200)
src/bindings/lua/simgrid_lua.cpp

index 8510071..61fcd2f 100644 (file)
@@ -17,7 +17,6 @@ extern "C" {
 #include <lauxlib.h>
 
 int luaopen_simgrid(lua_State *L);
-static void sglua_register_c_functions(lua_State *L);
 }
 
 /* ********************************************************************************* */
@@ -112,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
@@ -143,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;
 }