tree data UPDATE function for checking internal meta
diff --git a/src/tree_data_common.c b/src/tree_data_common.c
index 9746faa..30469c6 100644
--- a/src/tree_data_common.c
+++ b/src/tree_data_common.c
@@ -29,6 +29,7 @@
#include "log.h"
#include "ly_common.h"
#include "lyb.h"
+#include "metadata.h"
#include "parser_data.h"
#include "plugins_exts.h"
#include "printer_data.h"
@@ -1141,6 +1142,21 @@
return schema;
}
+LIBYANG_API_DEF ly_bool
+lyd_meta_is_internal(const struct lyd_meta *meta)
+{
+ const char *arg;
+
+ assert(meta->annotation);
+
+ arg = meta->annotation->argument;
+ if (!strcmp(meta->annotation->module->name, "yang") && !strcmp(arg, "lyds_tree")) {
+ return 1;
+ }
+
+ return 0;
+}
+
void
lyd_cont_set_dflt(struct lyd_node *node)
{