summaryrefslogtreecommitdiff
path: root/uci_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'uci_internal.h')
-rw-r--r--uci_internal.h3
1 files changed, 3 insertions, 0 deletions
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;