]> git.proxmox.com Git - libgit2.git/commitdiff
oidmap: remove GIT__USE_OIDMAP macro
authorPatrick Steinhardt <ps@pks.im>
Fri, 27 Jan 2017 14:23:15 +0000 (15:23 +0100)
committerPatrick Steinhardt <ps@pks.im>
Fri, 17 Feb 2017 10:41:06 +0000 (11:41 +0100)
src/cache.c
src/describe.c
src/indexer.c
src/odb_mempack.c
src/oidmap.c
src/oidmap.h
src/pack-objects.c
src/pack.c
src/revwalk.c
tests/core/oidmap.c

index f76e72d9381cb38bd3b487b27fc294765dbfacb2..c92a3a78a9791f0853a0bdaeb8738a330755f40c 100644 (file)
@@ -15,8 +15,6 @@
 #include "object.h"
 #include "git2/oid.h"
 
-GIT__USE_OIDMAP
-
 bool git_cache__enabled = true;
 ssize_t git_cache__max_storage = (256 * 1024 * 1024);
 git_atomic_ssize git_cache__current_storage = {0};
index 1523858363a7ac311b766702034417b71936c4d5..4a1e253787104d4d6c46b4d81ae53ac577bb7ee4 100644 (file)
@@ -19,8 +19,6 @@
 #include "vector.h"
 #include "repository.h"
 
-GIT__USE_OIDMAP
-
 /* Ported from https://github.com/git/git/blob/89dde7882f71f846ccd0359756d27bebc31108de/builtin/describe.c */
 
 struct commit_name {
index 3e88bc7ba97bf1a4ac1bad8296d152ef7c4012b0..869e2299f672f9368cfa475242849bcee50e6c9a 100644 (file)
@@ -18,8 +18,6 @@
 #include "oidmap.h"
 #include "zstream.h"
 
-GIT__USE_OIDMAP
-
 extern git_mutex git__mwindow_mutex;
 
 #define UINT31_MAX (0x7FFFFFFF)
index 52f8089e1bce47070acb280627953d6324e6e895..d6f2fb4af399d0b6bf43d03ddd868d4bd6973639 100644 (file)
@@ -18,8 +18,6 @@
 #include "git2/types.h"
 #include "git2/pack.h"
 
-GIT__USE_OIDMAP
-
 struct memobject {
        git_oid oid;
        size_t len;
index ab821df8d50841eadf6495e1511fbc302e9bc216..0df9a4f4258f30f16acb033d1598f32c5cf3b5ba 100644 (file)
@@ -7,6 +7,13 @@
 
 #include "oidmap.h"
 
+GIT_INLINE(khint_t) git_oidmap_hash(const git_oid *oid)
+{
+       khint_t h;
+       memcpy(&h, oid, sizeof(khint_t));
+       return h;
+}
+
 __KHASH_IMPL(oid, static kh_inline, const git_oid *, void *, 1, git_oidmap_hash, git_oid_equal)
 
 git_oidmap *git_oidmap_alloc()
index bfad8e2ad5ba2b45d7f3c9a5f715042baee1f4af..a3f8961dc809d06dc7690781b56d51a7b723a1d8 100644 (file)
 __KHASH_TYPE(oid, const git_oid *, void *)
 typedef khash_t(oid) git_oidmap;
 
-GIT_INLINE(khint_t) git_oidmap_hash(const git_oid *oid)
-{
-       khint_t h;
-       memcpy(&h, oid, sizeof(khint_t));
-       return h;
-}
-
-#define GIT__USE_OIDMAP \
-       __KHASH_IMPL(oid, static kh_inline, const git_oid *, void *, 1, git_oidmap_hash, git_oid_equal)
-
 git_oidmap *git_oidmap_alloc(void);
 #define git_oidmap_free(h) git_oidmap__free(h); (h) = NULL
 void git_oidmap__free(git_oidmap *map);
index 1b4ec9d158d1badee3d0278ace611909332309d2..58b7b94b3aa396d6936dadd153286c161cad184c 100644 (file)
@@ -41,8 +41,6 @@ struct pack_write_context {
        git_transfer_progress *stats;
 };
 
-GIT__USE_OIDMAP
-
 #ifdef GIT_THREADS
 
 #define GIT_PACKBUILDER__MUTEX_OP(pb, mtx, op) do { \
index 4e30ca7c3160b226a6e61897f9773a70fcdbce07..9be051e64abe9096a7216b034f2542430e2f31f5 100644 (file)
@@ -17,7 +17,6 @@
 #include <zlib.h>
 
 GIT__USE_OFFMAP
-GIT__USE_OIDMAP
 
 static int packfile_open(struct git_pack_file *p);
 static git_off_t nth_packed_object_offset(const struct git_pack_file *p, uint32_t n);
index ac54002532d2be7d7aa289e1d5f4953d986f1cad..6d08164ba68f9f3b71bfc6061f33fec0351b1884 100644 (file)
@@ -15,8 +15,6 @@
 #include "merge.h"
 #include "vector.h"
 
-GIT__USE_OIDMAP
-
 git_commit_list_node *git_revwalk__commit_lookup(
        git_revwalk *walk, const git_oid *oid)
 {
index 92b8c193734aa91701013f80210965a7168840f5..617da548319fc22bf62c332123aadd461c6dd1ed 100644 (file)
@@ -1,8 +1,6 @@
 #include "clar_libgit2.h"
 #include "oidmap.h"
 
-GIT__USE_OIDMAP
-
 typedef struct {
        git_oid oid;
        size_t extra;