summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2009-08-04 10:38:52 +0000
committerJo-Philipp Wich <jow@openwrt.org>2009-08-04 10:38:52 +0000
commit01c4048021b3dc108f8f5630801fcd87286447dd (patch)
tree5a5687286548087043b5b531842442c881bc891b
parentf637ea27ae6e978702a024e6bd56c5583e626eee (diff)
libs/core: fix loading of nixio.bit in luci.ip
-rw-r--r--libs/core/luasrc/ip.lua9
1 files changed, 5 insertions, 4 deletions
diff --git a/libs/core/luasrc/ip.lua b/libs/core/luasrc/ip.lua
index 0a66804e8..3b0ca6799 100644
--- a/libs/core/luasrc/ip.lua
+++ b/libs/core/luasrc/ip.lua
@@ -17,11 +17,12 @@ $Id$
--- LuCI IP calculation library.
module( "luci.ip", package.seeall )
-require("bit")
-require("luci.util")
+require "nixio"
+local bit = nixio.bit
+local util = require "luci.util"
--- Boolean; true if system is little endian
-LITTLE_ENDIAN = not luci.util.bigendian()
+LITTLE_ENDIAN = not util.bigendian()
--- Boolean; true if system is big endian
BIG_ENDIAN = not LITTLE_ENDIAN
@@ -324,7 +325,7 @@ end
-- @class module
-- @cstyle instance
-- @name luci.ip.cidr
-cidr = luci.util.class()
+cidr = util.class()
--- Test whether the instance is a IPv4 address.
-- @return Boolean indicating a IPv4 address type