diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2018-11-28 14:26:57 +0000 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2018-12-01 11:54:57 +0000 |
commit | 168fe39bea3368972a8b1a33d5908e73bc790c18 (patch) | |
tree | c6d07340e2d8d2d66091c44c7763f3e1823acca2 /src/cache.c | |
parent | 18e71e6d597abe6c7feb666429c921bd19dc0ba8 (diff) | |
download | libgit2-ethomson/index_fixes.tar.gz |
object_type: use new enumeration namesethomson/index_fixes
Use the new object_type enumeration names within the codebase.
Diffstat (limited to 'src/cache.c')
-rw-r--r-- | src/cache.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/cache.c b/src/cache.c index 6f20ac001..d786104b2 100644 --- a/src/cache.c +++ b/src/cache.c @@ -20,17 +20,17 @@ ssize_t git_cache__max_storage = (256 * 1024 * 1024); git_atomic_ssize git_cache__current_storage = {0}; static size_t git_cache__max_object_size[8] = { - 0, /* GIT_OBJ__EXT1 */ - 4096, /* GIT_OBJ_COMMIT */ - 4096, /* GIT_OBJ_TREE */ - 0, /* GIT_OBJ_BLOB */ - 4096, /* GIT_OBJ_TAG */ - 0, /* GIT_OBJ__EXT2 */ - 0, /* GIT_OBJ_OFS_DELTA */ - 0 /* GIT_OBJ_REF_DELTA */ + 0, /* GIT_OBJECT__EXT1 */ + 4096, /* GIT_OBJECT_COMMIT */ + 4096, /* GIT_OBJECT_TREE */ + 0, /* GIT_OBJECT_BLOB */ + 4096, /* GIT_OBJECT_TAG */ + 0, /* GIT_OBJECT__EXT2 */ + 0, /* GIT_OBJECT_OFS_DELTA */ + 0 /* GIT_OBJECT_REF_DELTA */ }; -int git_cache_set_max_object_size(git_otype type, size_t size) +int git_cache_set_max_object_size(git_object_t type, size_t size) { if (type < 0 || (size_t)type >= ARRAY_SIZE(git_cache__max_object_size)) { giterr_set(GITERR_INVALID, "type out of range"); @@ -140,7 +140,7 @@ static void cache_evict_entries(git_cache *cache) git_atomic_ssize_add(&git_cache__current_storage, -evicted_memory); } -static bool cache_should_store(git_otype object_type, size_t object_size) +static bool cache_should_store(git_object_t object_type, size_t object_size) { size_t max_size = git_cache__max_object_size[object_type]; return git_cache__enabled && object_size < max_size; |