/////////////////////////////
+typedef set<ComboAddress, ComboAddress::addressOnlyLessThan> ourset_t;
+
static int l_ipset_index(lua_State* L)
{
- set<ComboAddress>*ourset = (set<ComboAddress>*)luaL_checkudata(L, 1, "iputils.ipset");
+ ourset_t *ourset = (ourset_t*)luaL_checkudata(L, 1, "iputils.ipset");
ComboAddress* ca1 = (ComboAddress*)luaL_checkudata(L, 2, "iputils.ca");
if(ourset->count(*ca1)) {
lua_pushboolean(L, 1);
static int l_ipset_newindex(lua_State* L)
{
- set<ComboAddress>*ourset = (set<ComboAddress>*)luaL_checkudata(L, 1, "iputils.ipset");
+ ourset_t*ourset = (ourset_t*)luaL_checkudata(L, 1, "iputils.ipset");
ComboAddress* ca1 = (ComboAddress*)luaL_checkudata(L, 2, "iputils.ca");
ourset->insert(*ca1);
return 0;
static int l_newipset(lua_State* L)
{
- new(lua_newuserdata(L, sizeof(set<ComboAddress>))) set<ComboAddress>();
+ new(lua_newuserdata(L, sizeof(ourset_t))) ourset_t();
luaL_getmetatable(L, "iputils.ipset");
lua_setmetatable(L, -2);
return 1;
static int l_ipset_gc(lua_State* L)
{
- set<ComboAddress>*ourset = (set<ComboAddress>*)luaL_checkudata(L, 1, "iputils.ipset");
- ourset->~set<ComboAddress>();
+ ourset_t*ourset = (ourset_t*)luaL_checkudata(L, 1, "iputils.ipset");
+ ourset->~ourset_t();
return 0;
}