extension FEATURE parsed tree in lysp_ext_instance
A pointer to the parsed tree is now available in the lysp_ext_instance
structure. Now it is not necessary to temporarily create a parsed tree
in the lys_compile_extension_instance function. The callback function
lyplg_ext_compile_clb had to lose the const qualifier for the
lysp_ext_instance parameter.
diff --git a/src/tree_schema.h b/src/tree_schema.h
index b5eea87..9e8dc96 100644
--- a/src/tree_schema.h
+++ b/src/tree_schema.h
@@ -523,7 +523,9 @@
struct lysp_ext_instance {
const char *name; /**< extension identifier, including possible prefix */
const char *argument; /**< optional value of the extension's argument */
- LY_VALUE_FORMAT format; /**< prefix format of the extension name/argument (::LY_VALUE_XML is YIN format) */
+ LY_VALUE_FORMAT format; /**< prefix format of the extension name/argument (::LY_VALUE_XML is YIN format) */
+ struct lysp_node *parsed; /**< Simply parsed (unresolved) YANG schema tree serving as a cache.
+ Only lys_compile_extension_instance() can set this. */
void *prefix_data; /**< Format-specific data for prefix resolution
(see ly_resolve_prefix()) */