schema compile CHANGE compiling leafref types
- allow sharing type structure if it does not change since it does not
contain resolved target node which can differ for each instance
- remember correct context module for the leafref path since it may
contain prefixes which are valid only in the module where the path was
defined.
diff --git a/src/tree_schema.h b/src/tree_schema.h
index 61e04b6..7c11b63 100644
--- a/src/tree_schema.h
+++ b/src/tree_schema.h
@@ -1074,6 +1074,7 @@
LY_DATA_TYPE basetype; /**< Base type of the type */
uint32_t refcount; /**< reference counter for type sharing */
const char* path; /**< target path */
+ struct lys_module *path_context; /**< module where the path is defined, so it provides context to resolve prefixes */
uint8_t require_instance; /**< require-instance flag */
};