diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2009-02-08 00:48:21 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2009-02-08 00:48:21 +0000 |
commit | 474a6172680216ffea1484b04ab2c0c6ab0ad5e4 (patch) | |
tree | 820b577d2b6ac4d26e54f3ee826404489efaddf5 /libs | |
parent | a9f58b0c5270b7c29f2c296879600ee31bef6a92 (diff) |
libs/sys/iptparser: import required functions
Diffstat (limited to 'libs')
-rw-r--r-- | libs/sys/luasrc/sys/iptparser.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/sys/luasrc/sys/iptparser.lua b/libs/sys/luasrc/sys/iptparser.lua index 484a16fbc..a1d0515af 100644 --- a/libs/sys/luasrc/sys/iptparser.lua +++ b/libs/sys/luasrc/sys/iptparser.lua @@ -19,6 +19,8 @@ luci.util = require "luci.util" luci.sys = require "luci.sys" luci.ip = require "luci.ip" +local tonumber, ipairs = tonumber, ipairs + --- LuCI iptables parser and query library -- @cstyle instance module("luci.sys.iptparser") @@ -182,7 +184,7 @@ function IptParser.find( self, args ) -- insert match if match == true then - table.insert( rv, rule ) + rv[#rv+1] = rule end end @@ -235,7 +237,7 @@ function IptParser._parse_rules( self ) rule_details["options"][i-10] = rule_parts[i] end - table.insert( self._rules, rule_details ) + self._rules[#self._rules+1] = rule_details end end end |