tree data CHANGE lyd_leaf_type resolves leafrefs
Fixes #238
diff --git a/src/tree_data.h b/src/tree_data.h
index 909c051..733c2df 100644
--- a/src/tree_data.h
+++ b/src/tree_data.h
@@ -1090,11 +1090,13 @@
struct lys_module *lyd_node_module(const struct lyd_node *node);
/**
- * @brief Get the type structure of a leaf. In case of union, the correct
- * specific type is found.
+ * @brief Get the type structure of a leaf.
+ *
+ * In case of a union, the correct specific type is found.
+ * In case of a leafref, the final (if there is a chain of leafrefs) target's type is found.
*
* @param[in] leaf Leaf to examine.
- * @return Type structure of \p leaf, NULL on error.
+ * @return Found type, NULL on error.
*/
const struct lys_type *lyd_leaf_type(const struct lyd_node_leaf_list *leaf);