lua: additionally return name when looking up sections
authorJo-Philipp Wich <jo@mein.io>
Sun, 31 Dec 2017 10:30:32 +0000 (11:30 +0100)
committerJo-Philipp Wich <jo@mein.io>
Mon, 1 Jan 2018 15:00:16 +0000 (16:00 +0100)
commit5beb95da3dbec6db11a6bdfaab7807ee2daf41e6
tree4402ff77c809947f39b6d65eb7ed4b962a94ea62
parentff33bb219bc409ce3071734a1c28d9165392d6ea
lua: additionally return name when looking up sections

Return the resolved name in addition to the type when looking up sections
through `get()` - for example a `cursor:get("firewall", "@rule[0]")` will
now return two values in the form ("rule", "cfg0a92bd") instead of only
the type name.

This is mainly useful to resolve extended section names without having to
reimplement the section count logic in Lua code.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
lua/uci.c