lua: support extended section notation
authorJo-Philipp Wich <jo@mein.io>
Sun, 31 Dec 2017 10:08:22 +0000 (11:08 +0100)
committerJo-Philipp Wich <jo@mein.io>
Mon, 1 Jan 2018 15:55:25 +0000 (16:55 +0100)
commit1e17f24644663c3f875c4248c135667f287900d8
tree47a03f7fa60ff67534b7151721c05c9e239c23a8
parente1bf4356e1b513e158e1b5049147087ed6342cfd
lua: support extended section notation

Wrap uci_lookup_ptr() to enable extended section format lookups
when the passed section literal is in "@" notation.

This allows calls in the form `cursor:get("conf", "@stype[0]", "opt")`
which is useful to resolve options in numerically indexed anonymous
sections.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit ff33bb219bc409ce3071734a1c28d9165392d6ea)
lua/uci.c