Commit b63b76e0 by Carlos Martín Nieto

Reorder some khash declarations

Keep the definitions in the headers, while putting the declarations in
the C files. Putting the function definitions in headers causes
them to be duplicated if you include two headers with them.
parent c23f9005
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
#include "vector.h" #include "vector.h"
#include "repository.h" #include "repository.h"
GIT__USE_OIDMAP;
/* Ported from https://github.com/git/git/blob/89dde7882f71f846ccd0359756d27bebc31108de/builtin/describe.c */ /* Ported from https://github.com/git/git/blob/89dde7882f71f846ccd0359756d27bebc31108de/builtin/describe.c */
struct commit_name { struct commit_name {
......
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
#include "oidmap.h" #include "oidmap.h"
#include "zstream.h" #include "zstream.h"
GIT__USE_OIDMAP;
extern git_mutex git__mwindow_mutex; extern git_mutex git__mwindow_mutex;
#define UINT31_MAX (0x7FFFFFFF) #define UINT31_MAX (0x7FFFFFFF)
......
...@@ -39,6 +39,8 @@ struct pack_write_context { ...@@ -39,6 +39,8 @@ struct pack_write_context {
git_transfer_progress *stats; git_transfer_progress *stats;
}; };
GIT__USE_OIDMAP;
#ifdef GIT_THREADS #ifdef GIT_THREADS
#define GIT_PACKBUILDER__MUTEX_OP(pb, mtx, op) do { \ #define GIT_PACKBUILDER__MUTEX_OP(pb, mtx, op) do { \
......
...@@ -16,6 +16,9 @@ ...@@ -16,6 +16,9 @@
#include <zlib.h> #include <zlib.h>
GIT__USE_OFFMAP;
GIT__USE_OIDMAP;
static int packfile_open(struct git_pack_file *p); 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); static git_off_t nth_packed_object_offset(const struct git_pack_file *p, uint32_t n);
int packfile_unpack_compressed( int packfile_unpack_compressed(
......
...@@ -71,9 +71,7 @@ struct pack_chain_elem { ...@@ -71,9 +71,7 @@ struct pack_chain_elem {
typedef git_array_t(struct pack_chain_elem) git_dependency_chain; typedef git_array_t(struct pack_chain_elem) git_dependency_chain;
#include "offmap.h" #include "offmap.h"
#include "oidmap.h"
GIT__USE_OFFMAP
GIT__USE_OIDMAP
#define GIT_PACK_CACHE_MEMORY_LIMIT 16 * 1024 * 1024 #define GIT_PACK_CACHE_MEMORY_LIMIT 16 * 1024 * 1024
#define GIT_PACK_CACHE_SIZE_LIMIT 1024 * 1024 /* don't bother caching anything over 1MB */ #define GIT_PACK_CACHE_SIZE_LIMIT 1024 * 1024 /* don't bother caching anything over 1MB */
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
#include "git2/revparse.h" #include "git2/revparse.h"
#include "merge.h" #include "merge.h"
GIT__USE_OIDMAP;
git_commit_list_node *git_revwalk__commit_lookup( git_commit_list_node *git_revwalk__commit_lookup(
git_revwalk *walk, const git_oid *oid) git_revwalk *walk, const git_oid *oid)
{ {
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "pool.h" #include "pool.h"
#include "vector.h" #include "vector.h"
GIT__USE_OIDMAP #include "oidmap.h"
struct git_revwalk { struct git_revwalk {
git_repository *repo; git_repository *repo;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment