Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Slightly reorganize log categories; remove unused ones.
[simgrid.git] / src / bindings / lua / lua_host.cpp
index 175be6e..a633422 100644 (file)
@@ -9,8 +9,6 @@
 #include "simgrid/s4u/Host.hpp"
 #include <lauxlib.h>
 
-XBT_LOG_NEW_DEFAULT_CATEGORY(lua_host, "Lua Host module");
-
 constexpr char HOST_MODULE_NAME[] = "simgrid.host";
 constexpr char HOST_FIELDNAME[]   = "__simgrid_host";
 
@@ -30,8 +28,7 @@ sg_host_t sglua_check_host(lua_State * L, int index)
   lua_getfield(L, index, HOST_FIELDNAME);
   sg_host_t *pi = (sg_host_t *) luaL_checkudata(L, lua_gettop(L), HOST_MODULE_NAME);
   lua_pop(L, 1);
-  if (pi == nullptr)
-    XBT_ERROR("luaL_checkudata() returned nullptr");
+  xbt_assert(pi != nullptr, "luaL_checkudata() returned nullptr");
   sg_host_t ht = *pi;
   if (not ht)
     luaL_error(L, "null Host");
@@ -209,7 +206,7 @@ void sglua_register_host_functions(lua_State* L)
 
   /* metatable.__index = simgrid.host
    * we put the host functions inside the host userdata itself:
-   * this allows to write my_host:method(args) for
+   * this allows one to write my_host:method(args) for
    * simgrid.host.method(my_host, args) */
   lua_setfield(L, -2, "__index");         /* simgrid simgrid.host mt */