return ret;
}
+ #if !(defined(__i386__) && defined(__FreeBSD__))
bool LUABackend::getValueFromTable(lua_State *lua, const std::string& key, time_t& value) {
- lua_pushstring(lua, key.c_str());
- lua_gettable(lua, -2);
+ lua_pushstring(lua, key.c_str());
+ lua_gettable(lua, -2);
bool ret = false;
-
+
if(!lua_isnil(lua, -1)) {
value = (time_t)lua_tonumber(lua, -1);
ret = true;
}
-
+
lua_pop(lua, 1);
-
+
return ret;
}
+ #endif
bool LUABackend::getValueFromTable(lua_State *lua, const std::string& key, uint32_t& value) {
- lua_pushstring(lua, key.c_str());
- lua_gettable(lua, -2);
+ lua_pushstring(lua, key.c_str());
+ lua_gettable(lua, -2);
bool ret = false;
-
+
if(!lua_isnil(lua, -1)) {
value = (uint32_t)lua_tonumber(lua, -1);
ret = true;
// FUNCTIONS TO THIS BACKEND
bool getValueFromTable(lua_State *lua, const std::string& key, string& value);
+ bool getValueFromTable(lua_State *lua, const std::string& key, DNSName& value);
bool getValueFromTable(lua_State *lua, uint32_t key, string& value);
+ #if !(defined(__i386__) && defined(__FreeBSD__))
bool getValueFromTable(lua_State *lua, const std::string& key, time_t& value);
+ #endif
bool getValueFromTable(lua_State *lua, const std::string& key, uint32_t& value);
bool getValueFromTable(lua_State *lua, const std::string& key, uint16_t& value);
bool getValueFromTable(lua_State *lua, const std::string& key, int& value);