summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/yang_wrappers.c8
-rw-r--r--lib/yang_wrappers.h3
2 files changed, 11 insertions, 0 deletions
diff --git a/lib/yang_wrappers.c b/lib/yang_wrappers.c
index 21acd2c1f..a172529e5 100644
--- a/lib/yang_wrappers.c
+++ b/lib/yang_wrappers.c
@@ -783,6 +783,14 @@ void yang_get_default_string_buf(char *buf, size_t size, const char *xpath_fmt,
}
/*
+ * Primitive type: empty.
+ */
+struct yang_data *yang_data_new_empty(const char *xpath)
+{
+ return yang_data_new(xpath, NULL);
+}
+
+/*
* Derived type: IP prefix.
*/
void yang_str2prefix(const char *value, union prefixptr prefix)
diff --git a/lib/yang_wrappers.h b/lib/yang_wrappers.h
index 31d40a519..dfb42ca2a 100644
--- a/lib/yang_wrappers.h
+++ b/lib/yang_wrappers.h
@@ -114,6 +114,9 @@ extern const char *yang_get_default_string(const char *xpath_fmt, ...);
extern void yang_get_default_string_buf(char *buf, size_t size,
const char *xpath_fmt, ...);
+/* empty */
+extern struct yang_data *yang_data_new_empty(const char *xpath);
+
/* ip prefix */
extern void yang_str2prefix(const char *value, union prefixptr prefix);
extern struct yang_data *yang_data_new_prefix(const char *xpath,