]> granicus.if.org Git - pdns/commitdiff
make printing of netmasks and netmask groups from lua a bit easier
authorbert hubert <bert.hubert@netherlabs.nl>
Tue, 20 Jan 2015 19:56:24 +0000 (20:56 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Tue, 20 Jan 2015 19:56:24 +0000 (20:56 +0100)
pdns/lua-iputils.cc

index 980c0aabe40d720e1d357a72f6f21f0030f2e0ca..965645902391ddbd22d62f326ff8c8195b3a2aef 100644 (file)
@@ -164,6 +164,7 @@ static int l_netmask_gc(lua_State* L)
 
 static const struct luaL_Reg iputils_netmask_methods[]={
     {"__tostring", l_netmask_tostring},
+    {"tostring", l_netmask_tostring},
     {"match", l_netmask_match},
     {"__gc", l_netmask_gc},
     {NULL, NULL}
@@ -214,6 +215,7 @@ static int l_nmgroup_gc(lua_State* L)
 
 static const struct luaL_Reg iputils_nmgroup_methods[]={
     {"__tostring", l_nmgroup_tostring},
+    {"tostring", l_nmgroup_tostring},
     {"match", l_nmgroup_match},
     {"add", l_nmgroup_add},
     {"__gc", l_nmgroup_gc},