summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2019-11-22 15:04:09 +1100
committerEdward Thomson <ethomson@edwardthomson.com>2019-11-22 15:04:09 +1100
commit9b04d0be29caca53a48c683660d1c1ca77de7b02 (patch)
treeca04dc4913946d1c732c53316b55a7e9f16c1cd8
parent47dd665a62c3ac826277e6eda1287cf9291e8620 (diff)
downloadlibgit2-9b04d0be29caca53a48c683660d1c1ca77de7b02.tar.gz
types: introduce `git_object_size_t`
Introduce `git_object_size_t`, an unsigned type that we can use for the maximum size of git objects.
-rw-r--r--include/git2/object.h2
-rw-r--r--include/git2/types.h3
2 files changed, 5 insertions, 0 deletions
diff --git a/include/git2/object.h b/include/git2/object.h
index 2045dd8dc..984dbb7ac 100644
--- a/include/git2/object.h
+++ b/include/git2/object.h
@@ -21,6 +21,8 @@
*/
GIT_BEGIN_DECL
+#define GIT_OBJECT_SIZE_MAX UINT64_MAX
+
/**
* Lookup a reference to one of the objects in a repository.
*
diff --git a/include/git2/types.h b/include/git2/types.h
index de9ee43dd..ade0c7d32 100644
--- a/include/git2/types.h
+++ b/include/git2/types.h
@@ -63,6 +63,9 @@ typedef int64_t git_time_t; /**< time in seconds from epoch */
#endif
+/** The maximum size of an object */
+typedef uint64_t git_object_size_t;
+
#include "buffer.h"
#include "oid.h"