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 == NULL)
- XBT_ERROR("luaL_checkudata() returned NULL");
+ if (pi == nullptr)
+ XBT_ERROR("luaL_checkudata() returned nullptr");
sg_host_t ht = *pi;
if (!ht)
luaL_error(L, "null Host");
static int l_host_get_name(lua_State * L)
{
sg_host_t ht = sglua_check_host(L, 1);
- lua_pushstring(L, sg_host_get_name(ht));
+ lua_pushstring(L, ht->cname());
return 1;
}
{"destroy", l_host_destroy},
// Bypass XML Methods
{"set_property", console_host_set_property},
- {NULL, NULL}
+ {nullptr, nullptr}
};
/**