tree schema FEATURE new helper functions
diff --git a/src/tree_schema.h b/src/tree_schema.h
index 44d558d..2cc71ed 100644
--- a/src/tree_schema.h
+++ b/src/tree_schema.h
@@ -2009,6 +2009,19 @@
((lysc_node->nodetype == LYS_LEAFLIST) && !(lysc_node->flags & LYS_CONFIG_W)))) ? 1 : 0)
/**
+ * @brief Get nearest @p schema parent (including the node itself) that can be instantiated in data.
+ *
+ * @param[in] schema Schema node to get the nearest data node for.
+ * @return Schema data node, NULL if top-level (in data).
+ */
+LIBYANG_API_DECL const struct lysc_node *lysc_data_node(const struct lysc_node *schema);
+
+/**
+ * @brief Same as ::lysc_data_node() but never returns the node itself.
+ */
+#define lysc_data_parent(SCHEMA) lysc_data_node((SCHEMA) ? (SCHEMA)->parent : NULL)
+
+/**
* @brief Check whether the schema node data instance existence depends on any when conditions.
* This node and any direct parent choice and case schema nodes are also examined for when conditions.
*
diff --git a/src/tree_schema_helpers.c b/src/tree_schema_helpers.c
index 0bde0eb..e5953fc 100644
--- a/src/tree_schema_helpers.c
+++ b/src/tree_schema_helpers.c
@@ -2192,7 +2192,7 @@
return LY_ARRAY_COUNT(ext);
}
-const struct lysc_node *
+LIBYANG_API_DEF const struct lysc_node *
lysc_data_node(const struct lysc_node *schema)
{
const struct lysc_node *parent;
diff --git a/src/tree_schema_internal.h b/src/tree_schema_internal.h
index e28f69b..95ce0b7 100644
--- a/src/tree_schema_internal.h
+++ b/src/tree_schema_internal.h
@@ -837,19 +837,6 @@
size_t buflen);
/**
- * @brief Get nearest @p schema parent (including the node itself) that can be instantiated in data.
- *
- * @param[in] schema Schema node to get the nearest data node for.
- * @return Schema data node, NULL if top-level (in data).
- */
-const struct lysc_node *lysc_data_node(const struct lysc_node *schema);
-
-/**
- * @brief Same as ::lysc_data_node() but never returns the node itself.
- */
-#define lysc_data_parent(SCHEMA) lysc_data_node((SCHEMA) ? (SCHEMA)->parent : NULL)
-
-/**
* @brief Get format-specific prefix for a module.
*
* This function is available for type plugins via ::lyplg_type_get_prefix() API function.