annotation CHANGE WIP parsing XML attributes as YANG metadata annotations
Interconnect XML attributes in data tree with the corresponding metadata
annotation (implemented as a YANG extension plugin).
Still proof of concept with only type processing, not tested so far.
diff --git a/src/plugins_exts.h b/src/plugins_exts.h
index bf57f1a..2e90167 100644
--- a/src/plugins_exts.h
+++ b/src/plugins_exts.h
@@ -100,10 +100,17 @@
/**
* @brief Compile substatements of an extension instance.
+ * TODO
*/
LY_ERR lys_compile_extension_instance(struct lysc_ctx *ctx, const struct lysp_ext_instance *ext, struct lysc_ext_substmt *substmts);
/**
+ * @brief Free the extension instance's data compiled with lys_compile_extension_instance().
+ * TODO
+ */
+void lysc_extension_instance_free(struct ly_ctx *ctx, struct lysc_ext_substmt *substmts);
+
+/**
* @brief Update path in the compile context, which is used for logging where the compilation failed.
*
* @param[in] ctx Compile context with the path.
@@ -131,9 +138,10 @@
/**
* @brief Callback to free the extension specific data created by the lyext_clb_compile callback of the same extension plugin.
*
+ * @param[in] ctx libyang context.
* @param[in,out] ext Compiled extension structure where the data to free are placed.
*/
-typedef void (*lyext_clb_free)(struct lysc_ext_instance *ext);
+typedef void (*lyext_clb_free)(struct ly_ctx *ctx, struct lysc_ext_instance *ext);
/**
* @brief Callback to decide if data instance is valid according to the schema.