types CHANGE make the built-in's plugin callback public

The user type plugins will implement the types derived from the base
built-in types, so all that base callbacs used to implement these types
can be very useful for the derived type's plugins.
diff --git a/src/plugins_types.c b/src/plugins_types.c
index 44baeb2..8e58a0c 100644
--- a/src/plugins_types.c
+++ b/src/plugins_types.c
@@ -266,11 +266,6 @@
     return ly_get_prefix(mod, format, prefix_data);
 }
 
-/**
- * @brief Generic comparison callback checking the canonical value.
- *
- * Implementation of the ly_type_compare_clb.
- */
 API LY_ERR
 ly_type_compare_simple(const struct lyd_value *val1, const struct lyd_value *val2)
 {
diff --git a/src/plugins_types.h b/src/plugins_types.h
index ef05fa0..5a5f06d 100644
--- a/src/plugins_types.h
+++ b/src/plugins_types.h
@@ -367,7 +367,8 @@
  *
  * libyang includes set of plugins for all the built-in types. They are, by default, inherited to the derived types.
  * However, if the user type plugin for the specific type is loaded, the plugin can provide it's own functions.
- * The built-in types plugins and are public, so even the user type plugins can use them to do part of their own functionality.
+ * The built-in types plugin callbacks are public, so even the user type plugins can use them to do part of their own
+ * functionality.
  */
 struct lyplg_type {
     LY_DATA_TYPE type;               /**< implemented type, use LY_TYPE_UNKNOWN for derived data types */
@@ -389,32 +390,311 @@
 
 /**
  * @brief Generic simple comparison callback checking the canonical value.
- *
  * Implementation of the ::ly_type_compare_clb.
  */
 LY_ERR ly_type_compare_simple(const struct lyd_value *val1, const struct lyd_value *val2);
 
 /**
  * @brief Generic simple printer callback of the canonized value.
- *
  * Implementation of the ::ly_type_print_clb.
  */
 const char *ly_type_print_simple(const struct lyd_value *value, LY_PREFIX_FORMAT format, void *prefix_data, ly_bool *dynamic);
 
 /**
  * @brief Generic simple duplication callback.
- *
  * Implementation of the ::ly_type_dup_clb.
  */
 LY_ERR ly_type_dup_simple(const struct ly_ctx *ctx, const struct lyd_value *original, struct lyd_value *dup);
 
 /**
  * @brief Generic cleanup callback freeing only the canonized value in ::lyd_value.canonical.
- *
  * Simple implementation of the ::ly_type_free_clb.
  */
 void ly_type_free_simple(const struct ly_ctx *ctx, struct lyd_value *value);
 
+/*
+ * Binary built-in type functions
+ */
+
+/**
+ * @brief Validate, canonize and store value of the YANG built-in binary type.
+ * Implementation of the ly_type_store_clb.
+ */
+LY_ERR ly_type_store_binary(const struct ly_ctx *ctx, const struct lysc_type *type, const char *value, size_t value_len,
+        uint32_t options, LY_PREFIX_FORMAT format, void *prefix_data, uint32_t hints, const struct lysc_node *ctx_node,
+        struct lyd_value *storage, struct lys_glob_unres *unres, struct ly_err_item **err);
+
+/*
+ * Bits built-in type functions
+ */
+
+/**
+ * @brief Validate, canonize and store value of the YANG built-in bits type.
+ * Implementation of the ly_type_store_clb.
+ */
+LY_ERR ly_type_store_bits(const struct ly_ctx *ctx, const struct lysc_type *type, const char *value, size_t value_len,
+        uint32_t options, LY_PREFIX_FORMAT format, void *prefix_data, uint32_t hints, const struct lysc_node *ctx_node,
+        struct lyd_value *storage, struct lys_glob_unres *unres, struct ly_err_item **err);
+
+/**
+ * @brief Duplication callback of the bits values.
+ * Implementation of the ly_type_dup_clb.
+ */
+LY_ERR ly_type_dup_bits(const struct ly_ctx *ctx, const struct lyd_value *original, struct lyd_value *dup);
+
+/**
+ * @brief Free value of the YANG built-in bits type.
+ * Implementation of the ly_type_free_clb.
+ */
+void ly_type_free_bits(const struct ly_ctx *ctx, struct lyd_value *value);
+
+/*
+ * Boolean built-in type functions
+ */
+
+/**
+ * @brief Validate and store value of the YANG built-in boolean type.
+ * Implementation of the ly_type_store_clb.
+ */
+LY_ERR ly_type_store_boolean(const struct ly_ctx *ctx, const struct lysc_type *type, const char *value, size_t value_len,
+        uint32_t options, LY_PREFIX_FORMAT format, void *prefix_data, uint32_t hints, const struct lysc_node *ctx_node,
+        struct lyd_value *storage, struct lys_glob_unres *unres, struct ly_err_item **err);
+
+/*
+ * Decimal64 built-in type functions
+ */
+
+/**
+ * @brief Validate, canonize and store value of the YANG built-in decimal64 types.
+ * Implementation of the ly_type_store_clb.
+ */
+LY_ERR ly_type_store_decimal64(const struct ly_ctx *ctx, const struct lysc_type *type, const char *value, size_t value_len,
+        uint32_t options, LY_PREFIX_FORMAT format, void *prefix_data, uint32_t hints, const struct lysc_node *ctx_node,
+        struct lyd_value *storage, struct lys_glob_unres *unres, struct ly_err_item **err);
+
+/*
+ * Decimal64 built-in type functions
+ */
+
+/**
+ * @brief Validate and store value of the YANG built-in empty type.
+ * Implementation of the ly_type_store_clb.
+ */
+LY_ERR ly_type_store_empty(const struct ly_ctx *ctx, const struct lysc_type *type, const char *value, size_t value_len,
+        uint32_t options, LY_PREFIX_FORMAT format, void *prefix_data, uint32_t hints, const struct lysc_node *ctx_node,
+        struct lyd_value *storage, struct lys_glob_unres *unres, struct ly_err_item **err);
+
+/**
+ * @brief Comparison callback for built-in empty type.
+ * Implementation of the ly_type_compare_clb.
+ */
+LY_ERR ly_type_compare_empty(const struct lyd_value *val1, const struct lyd_value *val2);
+
+/*
+ * Enumeration built-in type functions
+ */
+
+/**
+ * @brief Validate, canonize and store value of the YANG built-in enumeration type.
+ * Implementation of the ly_type_store_clb.
+ */
+LY_ERR ly_type_store_enum(const struct ly_ctx *ctx, const struct lysc_type *type, const char *value, size_t value_len,
+        uint32_t options, LY_PREFIX_FORMAT format, void *prefix_data, uint32_t hints, const struct lysc_node *ctx_node,
+        struct lyd_value *storage, struct lys_glob_unres *unres, struct ly_err_item **err);
+
+/*
+ * Identityref built-in type functions
+ */
+
+/**
+ * @brief Validate, canonize and store value of the YANG built-in identiytref type.
+ * Implementation of the ly_type_store_clb.
+ */
+LY_ERR ly_type_store_identityref(const struct ly_ctx *ctx, const struct lysc_type *type, const char *value, size_t value_len,
+        uint32_t options, LY_PREFIX_FORMAT format, void *prefix_data, uint32_t hints, const struct lysc_node *ctx_node,
+        struct lyd_value *storage, struct lys_glob_unres *unres, struct ly_err_item **err);
+
+/**
+ * @brief Comparison callback for built-in identityref type.
+ * Implementation of the ly_type_compare_clb.
+ */
+LY_ERR ly_type_compare_identityref(const struct lyd_value *val1, const struct lyd_value *val2);
+
+/**
+ * @brief Printer callback printing identityref value.
+ * Implementation of the ly_type_print_clb.
+ */
+const char *ly_type_print_identityref(const struct lyd_value *value, LY_PREFIX_FORMAT format, void *prefix_data,
+        ly_bool *dynamic);
+
+/*
+ * Instance-identifier built-in type functions
+ */
+
+/**
+ * @brief Validate and store value of the YANG built-in instance-identifier type.
+ * Implementation of the ly_type_store_clb.
+ */
+LY_ERR ly_type_store_instanceid(const struct ly_ctx *ctx, const struct lysc_type *type, const char *value, size_t value_len,
+        uint32_t options, LY_PREFIX_FORMAT format, void *prefix_data, uint32_t hints, const struct lysc_node *ctx_node,
+        struct lyd_value *storage, struct lys_glob_unres *unres, struct ly_err_item **err);
+
+/**
+ * @brief Comparison callback checking the instance-identifier value.
+ * Implementation of the ly_type_compare_clb.
+ */
+LY_ERR ly_type_compare_instanceid(const struct lyd_value *val1, const struct lyd_value *val2);
+
+/**
+ * @brief Printer callback printing the instance-identifier value.
+ * Implementation of the ly_type_print_clb.
+ */
+const char *ly_type_print_instanceid(const struct lyd_value *value, LY_PREFIX_FORMAT format, void *prefix_data,
+        ly_bool *dynamic);
+
+/**
+ * @brief Duplication callback of the instance-identifier values.
+ * Implementation of the ly_type_dup_clb.
+ */
+LY_ERR ly_type_dup_instanceid(const struct ly_ctx *ctx, const struct lyd_value *original, struct lyd_value *dup);
+
+/**
+ * @brief Validate value of the YANG built-in instance-identifier type.
+ * Implementation of the ly_type_validate_clb.
+ */
+LY_ERR ly_type_validate_instanceid(const struct ly_ctx *ctx, const struct lysc_type *type, const struct lyd_node *ctx_node,
+        const struct lyd_node *tree, struct lyd_value *storage, struct ly_err_item **err);
+
+/**
+ * @brief Free value of the YANG built-in instance-identifier types.
+ * Implementation of the ly_type_free_clb.
+ */
+void ly_type_free_instanceid(const struct ly_ctx *ctx, struct lyd_value *value);
+
+/*
+ * Integer built-in types functions
+ */
+
+/**
+ * @brief Validate, canonize and store value of the YANG built-in signed integer types.
+ * Implementation of the ly_type_store_clb.
+ */
+LY_ERR ly_type_store_int(const struct ly_ctx *ctx, const struct lysc_type *type, const char *value, size_t value_len,
+        uint32_t options, LY_PREFIX_FORMAT format, void *prefix_data, uint32_t hints, const struct lysc_node *ctx_node,
+        struct lyd_value *storage, struct lys_glob_unres *unres, struct ly_err_item **err);
+
+/**
+ * @brief Validate and canonize value of the YANG built-in unsigned integer types.
+ * Implementation of the ly_type_store_clb.
+ */
+LY_ERR ly_type_store_uint(const struct ly_ctx *ctx, const struct lysc_type *type, const char *value, size_t value_len,
+        uint32_t options, LY_PREFIX_FORMAT format, void *prefix_data, uint32_t hints, const struct lysc_node *ctx_node,
+        struct lyd_value *storage, struct lys_glob_unres *unres, struct ly_err_item **err);
+
+/*
+ * Leafref built-in type functions
+ */
+
+/**
+ * @brief Validate, canonize and store value of the YANG built-in leafref type.
+ * Implementation of the ly_type_store_clb.
+ */
+LY_ERR ly_type_store_leafref(const struct ly_ctx *ctx, const struct lysc_type *type, const char *value, size_t value_len,
+        uint32_t options, LY_PREFIX_FORMAT format, void *prefix_data, uint32_t hints, const struct lysc_node *ctx_node,
+        struct lyd_value *storage, struct lys_glob_unres *unres, struct ly_err_item **err);
+
+/**
+ * @brief Comparison callback checking the leafref value.
+ * Implementation of the ly_type_compare_clb.
+ */
+LY_ERR ly_type_compare_leafref(const struct lyd_value *val1, const struct lyd_value *val2);
+
+/**
+ * @brief Printer callback printing the leafref value.
+ * Implementation of the ly_type_print_clb.
+ */
+const char *ly_type_print_leafref(const struct lyd_value *value, LY_PREFIX_FORMAT format, void *prefix_data,
+        ly_bool *dynamic);
+
+/**
+ * @brief Duplication callback of the leafref values.
+ * Implementation of the ly_type_dup_clb.
+ */
+LY_ERR ly_type_dup_leafref(const struct ly_ctx *ctx, const struct lyd_value *original, struct lyd_value *dup);
+
+/**
+ * @brief Validate value of the YANG built-in leafref type.
+ * Implementation of the ly_type_validate_clb.
+ */
+LY_ERR ly_type_validate_leafref(const struct ly_ctx *ctx, const struct lysc_type *type, const struct lyd_node *ctx_node,
+        const struct lyd_node *tree, struct lyd_value *storage, struct ly_err_item **err);
+
+/**
+ * @brief Free value of the YANG built-in leafref types.
+ * Implementation of the ly_type_free_clb.
+ */
+void ly_type_free_leafref(const struct ly_ctx *ctx, struct lyd_value *value);
+
+/*
+ * String built-in type functions
+ */
+
+/**
+ * @brief Validate and store value of the YANG built-in string type.
+ * Implementation of the ::ly_type_store_clb.
+ */
+LY_ERR ly_type_store_string(const struct ly_ctx *ctx, const struct lysc_type *type, const char *value, size_t value_len,
+        uint32_t options, LY_PREFIX_FORMAT format, void *prefix_data, uint32_t hints, const struct lysc_node *ctx_node,
+        struct lyd_value *storage, struct lys_glob_unres *unres, struct ly_err_item **err);
+
+/*
+ * Union built-in type functions
+ */
+
+/**
+ * @brief Validate, canonize and store value of the YANG built-in union type.
+ * Implementation of the ly_type_store_clb.
+ */
+LY_ERR ly_type_store_union(const struct ly_ctx *ctx, const struct lysc_type *type, const char *value, size_t value_len,
+        uint32_t options, LY_PREFIX_FORMAT format, void *prefix_data, uint32_t hints, const struct lysc_node *ctx_node,
+        struct lyd_value *storage, struct lys_glob_unres *unres, struct ly_err_item **err);
+
+/**
+ * @brief Comparison callback checking the union value.
+ * Implementation of the ly_type_compare_clb.
+ */
+LY_ERR ly_type_compare_union(const struct lyd_value *val1, const struct lyd_value *val2);
+
+/**
+ * @brief Printer callback printing the union value.
+ * Implementation of the ly_type_print_clb.
+ */
+const char *ly_type_print_union(const struct lyd_value *value, LY_PREFIX_FORMAT format, void *prefix_data,
+        ly_bool *dynamic);
+
+/**
+ * @brief Duplication callback of the union values.
+ * Implementation of the ly_type_dup_clb.
+ */
+LY_ERR ly_type_dup_union(const struct ly_ctx *ctx, const struct lyd_value *original, struct lyd_value *dup);
+
+/**
+ * @brief Validate value of the YANG built-in union type.
+ * Implementation of the ly_type_validate_clb.
+ */
+LY_ERR ly_type_validate_union(const struct ly_ctx *ctx, const struct lysc_type *type, const struct lyd_node *ctx_node,
+        const struct lyd_node *tree, struct lyd_value *storage, struct ly_err_item **err);
+
+/**
+ * @brief Free value of the YANG built-in union types.
+ * Implementation of the ly_type_free_clb.
+ */
+void ly_type_free_union(const struct ly_ctx *ctx, struct lyd_value *value);
+
+/*
+ * Other supporting functions
+ */
+
 /**
  * @brief Unsigned integer value parser and validator.
  *
diff --git a/src/plugins_types_binary.c b/src/plugins_types_binary.c
index b09bb92..c5cb593 100644
--- a/src/plugins_types_binary.c
+++ b/src/plugins_types_binary.c
@@ -27,12 +27,7 @@
 #include "common.h"
 #include "compat.h"
 
-/**
- * @brief Validate, canonize and store value of the YANG built-in binary type.
- *
- * Implementation of the ly_type_store_clb.
- */
-LY_ERR
+API LY_ERR
 ly_type_store_binary(const struct ly_ctx *ctx, const struct lysc_type *type, const char *value, size_t value_len,
         uint32_t options, LY_PREFIX_FORMAT UNUSED(format), void *UNUSED(prefix_data), uint32_t hints,
         const struct lysc_node *UNUSED(ctx_node), struct lyd_value *storage, struct lys_glob_unres *UNUSED(unres),
diff --git a/src/plugins_types_bits.c b/src/plugins_types_bits.c
index 152fdb5..1cf1445 100644
--- a/src/plugins_types_bits.c
+++ b/src/plugins_types_bits.c
@@ -29,12 +29,7 @@
 #include "common.h"
 #include "compat.h"
 
-/**
- * @brief Validate, canonize and store value of the YANG built-in bits type.
- *
- * Implementation of the ly_type_store_clb.
- */
-LY_ERR
+API LY_ERR
 ly_type_store_bits(const struct ly_ctx *ctx, const struct lysc_type *type, const char *value, size_t value_len,
         uint32_t options, LY_PREFIX_FORMAT UNUSED(format), void *UNUSED(prefix_data), uint32_t hints,
         const struct lysc_node *UNUSED(ctx_node), struct lyd_value *storage, struct lys_glob_unres *UNUSED(unres),
@@ -191,11 +186,7 @@
     return ret;
 }
 
-/* @brief Duplication callback of the bits values.
- *
- * Implementation of the ly_type_dup_clb.
- */
-LY_ERR
+API LY_ERR
 ly_type_dup_bits(const struct ly_ctx *ctx, const struct lyd_value *original, struct lyd_value *dup)
 {
     LY_ERR ret = LY_SUCCESS;
@@ -220,12 +211,7 @@
     return ret;
 }
 
-/**
- * @brief Free value of the YANG built-in bits type.
- *
- * Implementation of the ly_type_free_clb.
- */
-void
+API void
 ly_type_free_bits(const struct ly_ctx *ctx, struct lyd_value *value)
 {
     LY_ARRAY_FREE(value->bits_items);
diff --git a/src/plugins_types_boolean.c b/src/plugins_types_boolean.c
index c8c51b4..db2148c 100644
--- a/src/plugins_types_boolean.c
+++ b/src/plugins_types_boolean.c
@@ -27,12 +27,7 @@
 #include "common.h"
 #include "compat.h"
 
-/**
- * @brief Validate and store value of the YANG built-in boolean type.
- *
- * Implementation of the ly_type_store_clb.
- */
-LY_ERR
+API LY_ERR
 ly_type_store_boolean(const struct ly_ctx *ctx, const struct lysc_type *type, const char *value, size_t value_len,
         uint32_t options, LY_PREFIX_FORMAT UNUSED(format), void *UNUSED(prefix_data), uint32_t hints,
         const struct lysc_node *UNUSED(ctx_node), struct lyd_value *storage, struct lys_glob_unres *UNUSED(unres),
diff --git a/src/plugins_types_decimal64.c b/src/plugins_types_decimal64.c
index 720aece..d4044e8 100644
--- a/src/plugins_types_decimal64.c
+++ b/src/plugins_types_decimal64.c
@@ -28,12 +28,7 @@
 #include "common.h"
 #include "compat.h"
 
-/**
- * @brief Validate, canonize and store value of the YANG built-in decimal64 types.
- *
- * Implementation of the ly_type_store_clb.
- */
-LY_ERR
+API LY_ERR
 ly_type_store_decimal64(const struct ly_ctx *ctx, const struct lysc_type *type, const char *value, size_t value_len,
         uint32_t options, LY_PREFIX_FORMAT UNUSED(format), void *UNUSED(prefix_data), uint32_t hints,
         const struct lysc_node *UNUSED(ctx_node), struct lyd_value *storage, struct lys_glob_unres *UNUSED(unres),
diff --git a/src/plugins_types_empty.c b/src/plugins_types_empty.c
index 1de6476..4da1e88 100644
--- a/src/plugins_types_empty.c
+++ b/src/plugins_types_empty.c
@@ -26,12 +26,7 @@
 #include "common.h"
 #include "compat.h"
 
-/**
- * @brief Validate and store value of the YANG built-in empty type.
- *
- * Implementation of the ly_type_store_clb.
- */
-LY_ERR
+API LY_ERR
 ly_type_store_empty(const struct ly_ctx *ctx, const struct lysc_type *type, const char *value, size_t value_len,
         uint32_t options, LY_PREFIX_FORMAT UNUSED(format), void *UNUSED(prefix_data), uint32_t hints,
         const struct lysc_node *UNUSED(ctx_node), struct lyd_value *storage, struct lys_glob_unres *UNUSED(unres),
@@ -68,12 +63,7 @@
     return ret;
 }
 
-/**
- * @brief Comparison callback for built-in empty type.
- *
- * Implementation of the ly_type_compare_clb.
- */
-LY_ERR
+API LY_ERR
 ly_type_compare_empty(const struct lyd_value *val1, const struct lyd_value *val2)
 {
     if (val1->realtype != val2->realtype) {
diff --git a/src/plugins_types_enumeration.c b/src/plugins_types_enumeration.c
index adcc953..15b21e1 100644
--- a/src/plugins_types_enumeration.c
+++ b/src/plugins_types_enumeration.c
@@ -26,12 +26,7 @@
 #include "common.h"
 #include "compat.h"
 
-/**
- * @brief Validate, canonize and store value of the YANG built-in enumeration type.
- *
- * Implementation of the ly_type_store_clb.
- */
-LY_ERR
+API LY_ERR
 ly_type_store_enum(const struct ly_ctx *ctx, const struct lysc_type *type, const char *value, size_t value_len,
         uint32_t options, LY_PREFIX_FORMAT UNUSED(format), void *UNUSED(prefix_data), uint32_t hints,
         const struct lysc_node *UNUSED(ctx_node), struct lyd_value *storage, struct lys_glob_unres *UNUSED(unres),
diff --git a/src/plugins_types_identityref.c b/src/plugins_types_identityref.c
index f148368..3535c07 100644
--- a/src/plugins_types_identityref.c
+++ b/src/plugins_types_identityref.c
@@ -28,12 +28,7 @@
 #include "common.h"
 #include "compat.h"
 
-/**
- * @brief Printer callback printing identityref value.
- *
- * Implementation of the ly_type_print_clb.
- */
-const char *
+API const char *
 ly_type_print_identityref(const struct lyd_value *value, LY_PREFIX_FORMAT format, void *prefix_data, ly_bool *dynamic)
 {
     char *result = NULL;
@@ -46,12 +41,7 @@
     }
 }
 
-/**
- * @brief Validate, canonize and store value of the YANG built-in identiytref type.
- *
- * Implementation of the ly_type_store_clb.
- */
-LY_ERR
+API LY_ERR
 ly_type_store_identityref(const struct ly_ctx *ctx, const struct lysc_type *type, const char *value, size_t value_len,
         uint32_t options, LY_PREFIX_FORMAT format, void *prefix_data, uint32_t hints, const struct lysc_node *ctx_node,
         struct lyd_value *storage, struct lys_glob_unres *unres, struct ly_err_item **err)
@@ -170,12 +160,7 @@
     return ret;
 }
 
-/**
- * @brief Comparison callback for built-in identityref type.
- *
- * Implementation of the ly_type_compare_clb.
- */
-LY_ERR
+API LY_ERR
 ly_type_compare_identityref(const struct lyd_value *val1, const struct lyd_value *val2)
 {
     if (val1->realtype != val2->realtype) {
diff --git a/src/plugins_types_instanceid.c b/src/plugins_types_instanceid.c
index ed4095f..7bebe34 100644
--- a/src/plugins_types_instanceid.c
+++ b/src/plugins_types_instanceid.c
@@ -31,12 +31,7 @@
 
 #include "path.h"
 
-/**
- * @brief Printer callback printing the instance-identifier value.
- *
- * Implementation of the ly_type_print_clb.
- */
-const char *
+API const char *
 ly_type_print_instanceid(const struct lyd_value *value, LY_PREFIX_FORMAT format, void *prefix_data, ly_bool *dynamic)
 {
     LY_ARRAY_COUNT_TYPE u, v;
@@ -155,12 +150,7 @@
     return result;
 }
 
-/**
- * @brief Validate and store value of the YANG built-in instance-identifier type.
- *
- * Implementation of the ly_type_store_clb.
- */
-LY_ERR
+API LY_ERR
 ly_type_store_instanceid(const struct ly_ctx *ctx, const struct lysc_type *type, const char *value, size_t value_len,
         uint32_t options, LY_PREFIX_FORMAT format, void *prefix_data, uint32_t hints, const struct lysc_node *ctx_node,
         struct lyd_value *storage, struct lys_glob_unres *unres, struct ly_err_item **err)
@@ -208,12 +198,7 @@
     }
 }
 
-/**
- * @brief Validate value of the YANG built-in instance-identifier type.
- *
- * Implementation of the ly_type_validate_clb.
- */
-LY_ERR
+API LY_ERR
 ly_type_validate_instanceid(const struct ly_ctx *UNUSED(ctx), const struct lysc_type *UNUSED(type),
         const struct lyd_node *UNUSED(ctx_node), const struct lyd_node *tree, struct lyd_value *storage,
         struct ly_err_item **err)
@@ -233,12 +218,7 @@
     return ly_err_new(err, ret, LYVE_DATA, NULL, NULL, LY_ERRMSG_NOINST, storage->canonical);
 }
 
-/**
- * @brief Comparison callback checking the instance-identifier value.
- *
- * Implementation of the ly_type_compare_clb.
- */
-LY_ERR
+API LY_ERR
 ly_type_compare_instanceid(const struct lyd_value *val1, const struct lyd_value *val2)
 {
     LY_ARRAY_COUNT_TYPE u, v;
@@ -294,12 +274,7 @@
     return LY_SUCCESS;
 }
 
-/**
- * @brief Duplication callback of the instance-identifier values.
- *
- * Implementation of the ly_type_dup_clb.
- */
-LY_ERR
+API LY_ERR
 ly_type_dup_instanceid(const struct ly_ctx *ctx, const struct lyd_value *original, struct lyd_value *dup)
 {
     LY_CHECK_RET(lydict_insert(ctx, original->canonical, strlen(original->canonical), &dup->canonical));
@@ -307,12 +282,7 @@
     return ly_path_dup(ctx, original->target, &dup->target);
 }
 
-/**
- * @brief Free value of the YANG built-in instance-identifier types.
- *
- * Implementation of the ly_type_free_clb.
- */
-void
+API void
 ly_type_free_instanceid(const struct ly_ctx *ctx, struct lyd_value *value)
 {
     ly_path_free(ctx, value->target);
diff --git a/src/plugins_types_integer.c b/src/plugins_types_integer.c
index 9dd6c9b..f0e5383 100644
--- a/src/plugins_types_integer.c
+++ b/src/plugins_types_integer.c
@@ -27,12 +27,7 @@
 #include "common.h"
 #include "compat.h"
 
-/**
- * @brief Validate, canonize and store value of the YANG built-in signed integer types.
- *
- * Implementation of the ly_type_store_clb.
- */
-LY_ERR
+API LY_ERR
 ly_type_store_int(const struct ly_ctx *ctx, const struct lysc_type *type, const char *value, size_t value_len,
         uint32_t options, LY_PREFIX_FORMAT UNUSED(format), void *UNUSED(prefix_data), uint32_t hints,
         const struct lysc_node *UNUSED(ctx_node), struct lyd_value *storage, struct lys_glob_unres *UNUSED(unres),
@@ -89,12 +84,7 @@
     return ret;
 }
 
-/**
- * @brief Validate and canonize value of the YANG built-in unsigned integer types.
- *
- * Implementation of the ly_type_store_clb.
- */
-LY_ERR
+API LY_ERR
 ly_type_store_uint(const struct ly_ctx *ctx, const struct lysc_type *type, const char *value, size_t value_len,
         uint32_t options, LY_PREFIX_FORMAT UNUSED(format), void *UNUSED(prefix_data), uint32_t hints,
         const struct lysc_node *UNUSED(ctx_node), struct lyd_value *storage, struct lys_glob_unres *UNUSED(unres),
diff --git a/src/plugins_types_leafref.c b/src/plugins_types_leafref.c
index b8bef25..34c7523 100644
--- a/src/plugins_types_leafref.c
+++ b/src/plugins_types_leafref.c
@@ -27,12 +27,7 @@
 #include "common.h"
 #include "compat.h"
 
-/**
- * @brief Store and canonize value of the YANG built-in leafref type.
- *
- * Implementation of the ly_type_store_clb.
- */
-LY_ERR
+API LY_ERR
 ly_type_store_leafref(const struct ly_ctx *ctx, const struct lysc_type *type, const char *value, size_t value_len,
         uint32_t options, LY_PREFIX_FORMAT format, void *prefix_data, uint32_t hints, const struct lysc_node *ctx_node,
         struct lyd_value *storage, struct lys_glob_unres *unres, struct ly_err_item **err)
@@ -59,12 +54,7 @@
     }
 }
 
-/**
- * @brief Validate value of the YANG built-in leafref type.
- *
- * Implementation of the ly_type_validate_clb.
- */
-LY_ERR
+API LY_ERR
 ly_type_validate_leafref(const struct ly_ctx *UNUSED(ctx), const struct lysc_type *type, const struct lyd_node *ctx_node,
         const struct lyd_node *tree, struct lyd_value *storage, struct ly_err_item **err)
 {
@@ -90,45 +80,25 @@
     return ret;
 }
 
-/**
- * @brief Comparison callback checking the leafref value.
- *
- * Implementation of the ly_type_compare_clb.
- */
-LY_ERR
+API LY_ERR
 ly_type_compare_leafref(const struct lyd_value *val1, const struct lyd_value *val2)
 {
     return val1->realtype->plugin->compare(val1, val2);
 }
 
-/**
- * @brief Printer callback printing the leafref value.
- *
- * Implementation of the ly_type_print_clb.
- */
-const char *
+API const char *
 ly_type_print_leafref(const struct lyd_value *value, LY_PREFIX_FORMAT format, void *prefix_data, ly_bool *dynamic)
 {
     return value->realtype->plugin->print(value, format, prefix_data, dynamic);
 }
 
-/**
- * @brief Duplication callback of the leafref values.
- *
- * Implementation of the ly_type_dup_clb.
- */
-LY_ERR
+API LY_ERR
 ly_type_dup_leafref(const struct ly_ctx *ctx, const struct lyd_value *original, struct lyd_value *dup)
 {
     return original->realtype->plugin->duplicate(ctx, original, dup);
 }
 
-/**
- * @brief Free value of the YANG built-in leafref type.
- *
- * Implementation of the ly_type_free_clb.
- */
-void
+API void
 ly_type_free_leafref(const struct ly_ctx *ctx, struct lyd_value *value)
 {
     if (value->realtype->plugin != &ly_builtin_type_plugins[LY_TYPE_LEAFREF]) {
diff --git a/src/plugins_types_string.c b/src/plugins_types_string.c
index 28b3e31..af08545 100644
--- a/src/plugins_types_string.c
+++ b/src/plugins_types_string.c
@@ -26,12 +26,7 @@
 #include "common.h"
 #include "compat.h"
 
-/**
- * @brief Validate and store value of the YANG built-in string type.
- *
- * Implementation of the ly_type_store_clb.
- */
-LY_ERR
+API LY_ERR
 ly_type_store_string(const struct ly_ctx *ctx, const struct lysc_type *type, const char *value, size_t value_len,
         uint32_t options, LY_PREFIX_FORMAT UNUSED(format), void *UNUSED(prefix_data), uint32_t hints,
         const struct lysc_node *UNUSED(ctx_node), struct lyd_value *storage, struct lys_glob_unres *UNUSED(unres),
diff --git a/src/plugins_types_union.c b/src/plugins_types_union.c
index 0748567..17a0fcc 100644
--- a/src/plugins_types_union.c
+++ b/src/plugins_types_union.c
@@ -79,12 +79,7 @@
     return ret;
 }
 
-/**
- * @brief Store and canonize value of the YANG built-in union type.
- *
- * Implementation of the ly_type_store_clb.
- */
-LY_ERR
+API LY_ERR
 ly_type_store_union(const struct ly_ctx *ctx, const struct lysc_type *type, const char *value, size_t value_len,
         uint32_t options, LY_PREFIX_FORMAT format, void *prefix_data, uint32_t hints, const struct lysc_node *ctx_node,
         struct lyd_value *storage, struct lys_glob_unres *unres, struct ly_err_item **err)
@@ -144,12 +139,7 @@
     return ret;
 }
 
-/**
- * @brief Validate value of the YANG built-in union type.
- *
- * Implementation of the ly_type_validate_clb.
- */
-LY_ERR
+API LY_ERR
 ly_type_validate_union(const struct ly_ctx *ctx, const struct lysc_type *type, const struct lyd_node *ctx_node,
         const struct lyd_node *tree, struct lyd_value *storage, struct ly_err_item **err)
 {
@@ -187,12 +177,7 @@
     return LY_SUCCESS;
 }
 
-/**
- * @brief Comparison callback checking the union value.
- *
- * Implementation of the ly_type_compare_clb.
- */
-LY_ERR
+API LY_ERR
 ly_type_compare_union(const struct lyd_value *val1, const struct lyd_value *val2)
 {
     if (val1->realtype != val2->realtype) {
@@ -205,23 +190,13 @@
     return val1->subvalue->value.realtype->plugin->compare(&val1->subvalue->value, &val2->subvalue->value);
 }
 
-/**
- * @brief Printer callback printing the union value.
- *
- * Implementation of the ly_type_print_clb.
- */
-const char *
+API const char *
 ly_type_print_union(const struct lyd_value *value, LY_PREFIX_FORMAT format, void *prefix_data, ly_bool *dynamic)
 {
     return value->subvalue->value.realtype->plugin->print(&value->subvalue->value, format, prefix_data, dynamic);
 }
 
-/**
- * @brief Duplication callback of the union values.
- *
- * Implementation of the ly_type_dup_clb.
- */
-LY_ERR
+API LY_ERR
 ly_type_dup_union(const struct ly_ctx *ctx, const struct lyd_value *original, struct lyd_value *dup)
 {
     LY_CHECK_RET(lydict_insert(ctx, original->canonical, strlen(original->canonical), &dup->canonical));
@@ -240,12 +215,7 @@
     return LY_SUCCESS;
 }
 
-/**
- * @brief Free value of the YANG built-in union type.
- *
- * Implementation of the ly_type_free_clb.
- */
-void
+API void
 ly_type_free_union(const struct ly_ctx *ctx, struct lyd_value *value)
 {
     lydict_remove(ctx, value->canonical);