summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicent Martí <tanoku@gmail.com>2011-07-25 12:02:20 -0700
committerVicent Martí <tanoku@gmail.com>2011-07-25 12:02:20 -0700
commit738715eb4c12357b150e04ca1fd174f90bf22b9d (patch)
tree2b0ecf3a591a99330858d8add9bf4f2679c5c490
parentf630366f70aa9ddffb7c3001c371fae6b0a0c004 (diff)
parentac2351fdec13a3f1631e84e95a02e950213bf904 (diff)
downloadlibgit2-738715eb4c12357b150e04ca1fd174f90bf22b9d.tar.gz
Merge pull request #337 from belkiss/development
Modify struct definition to enable forward declare with C++ compiler, thus avoid including C library's header in C++ header.
-rw-r--r--include/git2/oid.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/git2/oid.h b/include/git2/oid.h
index 96f8649f0..8a0f134b9 100644
--- a/include/git2/oid.h
+++ b/include/git2/oid.h
@@ -48,10 +48,11 @@ GIT_BEGIN_DECL
#define GIT_OID_MINPREFIXLEN 4
/** Unique identity of any object (commit, tree, blob, tag). */
-typedef struct {
+typedef struct _git_oid git_oid;
+struct _git_oid {
/** raw binary formatted id */
unsigned char id[GIT_OID_RAWSZ];
-} git_oid;
+};
/**
* Parse a hex formatted object id into a git_oid.