summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2011-06-16 02:21:33 +0200
committerVicent Marti <tanoku@gmail.com>2011-06-16 02:21:33 +0200
commit536955f9d7995b51d3caa0352d62728c5099543a (patch)
tree227bf40a777e9b3cedb41c665526b080f563b10b /src/util.c
parentef9a6f4cbc4aac143279d7eb37909e78fd7c62cc (diff)
downloadlibgit2-536955f9d7995b51d3caa0352d62728c5099543a.tar.gz
Add method to get the compiled version of the lib
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index 560c40dbb..f36cce5fe 100644
--- a/src/util.c
+++ b/src/util.c
@@ -1,9 +1,17 @@
#define GIT__NO_HIDE_MALLOC
+#include <git2.h>
#include "common.h"
#include <stdarg.h>
#include <stdio.h>
#include <ctype.h>
+void git_libgit2_version(int *major, int *minor, int *rev)
+{
+ *major = LIBGIT2_VER_MAJOR;
+ *minor = LIBGIT2_VER_MINOR;
+ *rev = LIBGIT2_VER_REVISION;
+}
+
void git_strarray_free(git_strarray *array)
{
size_t i;