summaryrefslogtreecommitdiffstats
path: root/src/ly_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ly_common.c')
-rw-r--r--src/ly_common.c58
1 files changed, 46 insertions, 12 deletions
diff --git a/src/ly_common.c b/src/ly_common.c
index 28d7514..449c862 100644
--- a/src/ly_common.c
+++ b/src/ly_common.c
@@ -40,19 +40,53 @@
#include "version.h"
#include "xml.h"
-LIBYANG_API_DEF struct ly_version ly_version_so = {
- .major = LY_VERSION_MAJOR,
- .minor = LY_VERSION_MINOR,
- .micro = LY_VERSION_MICRO,
- .str = LY_VERSION
-};
+LIBYANG_API_DEF uint32_t
+ly_version_so_major(void)
+{
+ return LY_VERSION_MAJOR;
+}
-LIBYANG_API_DEF struct ly_version ly_version_proj = {
- .major = LY_PROJ_VERSION_MAJOR,
- .minor = LY_PROJ_VERSION_MINOR,
- .micro = LY_PROJ_VERSION_MICRO,
- .str = LY_PROJ_VERSION
-};
+LIBYANG_API_DEF uint32_t
+ly_version_so_minor(void)
+{
+ return LY_VERSION_MINOR;
+}
+
+LIBYANG_API_DEF uint32_t
+ly_version_so_micro(void)
+{
+ return LY_VERSION_MICRO;
+}
+
+LIBYANG_API_DEF const char *
+ly_version_so_str(void)
+{
+ return LY_VERSION;
+}
+
+LIBYANG_API_DEF uint32_t
+ly_version_proj_major(void)
+{
+ return LY_PROJ_VERSION_MAJOR;
+}
+
+LIBYANG_API_DEF uint32_t
+ly_version_proj_minor(void)
+{
+ return LY_PROJ_VERSION_MINOR;
+}
+
+LIBYANG_API_DEF uint32_t
+ly_version_proj_micro(void)
+{
+ return LY_PROJ_VERSION_MICRO;
+}
+
+LIBYANG_API_DEF const char *
+ly_version_proj_str(void)
+{
+ return LY_PROJ_VERSION;
+}
void *
ly_realloc(void *ptr, size_t size)