diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2019-11-22 15:04:09 +1100 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2019-11-22 15:04:09 +1100 |
commit | 9b04d0be29caca53a48c683660d1c1ca77de7b02 (patch) | |
tree | ca04dc4913946d1c732c53316b55a7e9f16c1cd8 | |
parent | 47dd665a62c3ac826277e6eda1287cf9291e8620 (diff) | |
download | libgit2-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.h | 2 | ||||
-rw-r--r-- | include/git2/types.h | 3 |
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" |