X-Git-Url: http://git.openwrt.org/openwrt/feeds.git?a=blobdiff_plain;f=uci_internal.h;h=ff4ee8cbb18c9a3e1813230dab99187fc3698124;hb=04d0c46cfe30f557da0c603516636830cab4a08a;hp=34528f0495050e0652ec2c3a426eb0299daca4d4;hpb=ae61e1cad4a14e1cf4d0e5f4638354dafa77e5d3;p=project%2Fuci.git diff --git a/uci_internal.h b/uci_internal.h index 34528f0..ff4ee8c 100644 --- a/uci_internal.h +++ b/uci_internal.h @@ -42,6 +42,9 @@ struct uci_parse_context #define pctx_char(pctx, i) ((pctx)->buf[(i)]) #define pctx_cur_char(pctx) pctx_char(pctx, pctx_pos(pctx)) +#define uci_alloc_element(ctx, type, name, datasize) \ + uci_to_ ## type (uci_alloc_generic(ctx, uci_type_ ## type, name, sizeof(struct uci_ ## type) + datasize)) + extern const char *uci_confdir; extern const char *uci_savedir;