Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
536955f9
Commit
536955f9
authored
Jun 16, 2011
by
Vicent Marti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add method to get the compiled version of the lib
parent
ef9a6f4c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
include/git2/common.h
+10
-0
src/util.c
+8
-0
No files found.
include/git2/common.h
View file @
536955f9
...
...
@@ -113,6 +113,16 @@ typedef struct {
GIT_EXTERN
(
void
)
git_strarray_free
(
git_strarray
*
array
);
/**
* Return the version of the libgit2 library
* being currently used.
*
* @param major Store the major version number
* @param minor Store the minor version number
* @param rev Store the revision (patch) number
*/
GIT_EXTERN
(
void
)
git_libgit2_version
(
int
*
major
,
int
*
minor
,
int
*
rev
);
/** @} */
GIT_END_DECL
#endif
src/util.c
View file @
536955f9
#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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment