version UPDATE retrieve versions using functions
To avoid cuplicit structure definition in plugin
test.
diff --git a/src/version.h.in b/src/version.h.in
index 2fe6663..021cd05 100644
--- a/src/version.h.in
+++ b/src/version.h.in
@@ -32,22 +32,61 @@
#define LY_PROJ_VERSION_MICRO @LIBYANG_MICRO_VERSION@ /**< project micro version number */
#define LY_PROJ_VERSION "@LIBYANG_VERSION@" /**< project version string */
-struct ly_version {
- uint32_t major; /**< Major version number */
- uint32_t minor; /**< Minor version number */
- uint32_t micro; /**< Micro version number */
- const char *str; /**< Version string */
-};
+/**
+ * @brief Get libyang major SO version.
+ *
+ * @return LY version.
+ */
+LIBYANG_API_DECL uint32_t ly_version_so_major(void);
/**
- * @brief libyang SO version.
+ * @brief Get libyang minor SO version.
+ *
+ * @return LY version.
*/
-LIBYANG_API_DECL extern struct ly_version ly_version_so;
+LIBYANG_API_DECL uint32_t ly_version_so_minor(void);
/**
- * @brief libyang project version.
+ * @brief Get libyang micro SO version.
+ *
+ * @return LY version.
*/
-LIBYANG_API_DECL extern struct ly_version ly_version_proj;
+LIBYANG_API_DECL uint32_t ly_version_so_micro(void);
+
+/**
+ * @brief Get libyang string SO version.
+ *
+ * @return LY version.
+ */
+LIBYANG_API_DECL const char *ly_version_so_str(void);
+
+/**
+ * @brief Get libyang major project version.
+ *
+ * @return LY version.
+ */
+LIBYANG_API_DECL uint32_t ly_version_proj_major(void);
+
+/**
+ * @brief Get libyang minor project version.
+ *
+ * @return LY version.
+ */
+LIBYANG_API_DECL uint32_t ly_version_proj_minor(void);
+
+/**
+ * @brief Get libyang micro project version.
+ *
+ * @return LY version.
+ */
+LIBYANG_API_DECL uint32_t ly_version_proj_micro(void);
+
+/**
+ * @brief Get libyang string project version.
+ *
+ * @return LY version.
+ */
+LIBYANG_API_DECL const char *ly_version_proj_str(void);
#ifdef __cplusplus
}