Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Replace #define with constexpr declarations.
[simgrid.git] / src / bindings / lua / lua_host.cpp
index 7f42752..175be6e 100644 (file)
@@ -11,8 +11,9 @@
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(lua_host, "Lua Host module");
 
-#define HOST_MODULE_NAME "simgrid.host"
-#define HOST_FIELDNAME   "__simgrid_host"
+constexpr char HOST_MODULE_NAME[] = "simgrid.host";
+constexpr char HOST_FIELDNAME[]   = "__simgrid_host";
+
 /* ********************************************************************************* */
 /*                                simgrid.host API                                   */
 /* ********************************************************************************* */
@@ -143,8 +144,8 @@ static int l_host_get_property_value(lua_State * L)
  */
 static int l_host_destroy(lua_State *L)
 {
-  //sg_host_t ht = sglua_check_host(L, 1);
-  //FIXME: not working..__MSG_host_priv_free(MSG_host_priv(ht));
+  sg_host_t ht = sglua_check_host(L, 1);
+  ht->destroy();
   return 0;
 }