Commit 13c3bc9a by Patrick Steinhardt

strmap: remove GIT__USE_STRMAP macro

parent a13cfd2a
...@@ -7,8 +7,6 @@ ...@@ -7,8 +7,6 @@
#include "git2/oid.h" #include "git2/oid.h"
#include <ctype.h> #include <ctype.h>
GIT__USE_STRMAP
const char *git_attr__true = "[internal]__TRUE__"; const char *git_attr__true = "[internal]__TRUE__";
const char *git_attr__false = "[internal]__FALSE__"; const char *git_attr__false = "[internal]__FALSE__";
const char *git_attr__unset = "[internal]__UNSET__"; const char *git_attr__unset = "[internal]__UNSET__";
......
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
#include "sysdir.h" #include "sysdir.h"
#include "ignore.h" #include "ignore.h"
GIT__USE_STRMAP
GIT_INLINE(int) attr_cache_lock(git_attr_cache *cache) GIT_INLINE(int) attr_cache_lock(git_attr_cache *cache)
{ {
GIT_UNUSED(cache); /* avoid warning if threading is off */ GIT_UNUSED(cache); /* avoid warning if threading is off */
......
...@@ -35,8 +35,6 @@ ...@@ -35,8 +35,6 @@
#include "pool.h" #include "pool.h"
#include "strmap.h" #include "strmap.h"
GIT__USE_STRMAP
/* See docs/checkout-internals.md for more information */ /* See docs/checkout-internals.md for more information */
enum { enum {
......
...@@ -21,8 +21,6 @@ ...@@ -21,8 +21,6 @@
#include <sys/types.h> #include <sys/types.h>
#include <regex.h> #include <regex.h>
GIT__USE_STRMAP
typedef struct cvar_t { typedef struct cvar_t {
struct cvar_t *next; struct cvar_t *next;
git_config_entry *entry; git_config_entry *entry;
......
...@@ -16,8 +16,6 @@ ...@@ -16,8 +16,6 @@
#include "config.h" #include "config.h"
#include "repository.h" #include "repository.h"
GIT__USE_STRMAP
typedef enum { typedef enum {
DIFF_DRIVER_AUTO = 0, DIFF_DRIVER_AUTO = 0,
DIFF_DRIVER_BINARY = 1, DIFF_DRIVER_BINARY = 1,
......
...@@ -13,8 +13,6 @@ ...@@ -13,8 +13,6 @@
#include "win32/findfile.h" #include "win32/findfile.h"
#endif #endif
GIT__USE_STRMAP
int git_futils_mkpath2file(const char *file_path, const mode_t mode) int git_futils_mkpath2file(const char *file_path, const mode_t mode)
{ {
return git_futils_mkdir( return git_futils_mkdir(
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
#include "strmap.h" #include "strmap.h"
#include "pack.h" #include "pack.h"
GIT__USE_STRMAP
#define DEFAULT_WINDOW_SIZE \ #define DEFAULT_WINDOW_SIZE \
(sizeof(void*) >= 8 \ (sizeof(void*) >= 8 \
? 1 * 1024 * 1024 * 1024 \ ? 1 * 1024 * 1024 * 1024 \
......
...@@ -26,8 +26,6 @@ ...@@ -26,8 +26,6 @@
#include <git2/sys/refs.h> #include <git2/sys/refs.h>
#include <git2/sys/reflog.h> #include <git2/sys/reflog.h>
GIT__USE_STRMAP
#define DEFAULT_NESTING_LEVEL 5 #define DEFAULT_NESTING_LEVEL 5
#define MAX_NESTING_LEVEL 10 #define MAX_NESTING_LEVEL 10
......
...@@ -26,8 +26,6 @@ ...@@ -26,8 +26,6 @@
bool git_reference__enable_symbolic_ref_target_validation = true; bool git_reference__enable_symbolic_ref_target_validation = true;
GIT__USE_STRMAP
#define DEFAULT_NESTING_LEVEL 5 #define DEFAULT_NESTING_LEVEL 5
#define MAX_NESTING_LEVEL 10 #define MAX_NESTING_LEVEL 10
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#include "submodule.h" #include "submodule.h"
#include "worktree.h" #include "worktree.h"
GIT__USE_STRMAP
#include "strmap.h" #include "strmap.h"
#ifdef GIT_WIN32 #ifdef GIT_WIN32
......
#include "sortedcache.h" #include "sortedcache.h"
GIT__USE_STRMAP
int git_sortedcache_new( int git_sortedcache_new(
git_sortedcache **out, git_sortedcache **out,
size_t item_path_offset, size_t item_path_offset,
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include "strmap.h" #include "strmap.h"
GIT__USE_STRMAP __KHASH_IMPL(str, static kh_inline, const char *, void *, 1, kh_str_hash_func, kh_str_hash_equal)
int git_strmap_alloc(git_strmap **map) int git_strmap_alloc(git_strmap **map)
{ {
......
...@@ -20,9 +20,6 @@ __KHASH_TYPE(str, const char *, void *) ...@@ -20,9 +20,6 @@ __KHASH_TYPE(str, const char *, void *)
typedef khash_t(str) git_strmap; typedef khash_t(str) git_strmap;
typedef khiter_t git_strmap_iter; typedef khiter_t git_strmap_iter;
#define GIT__USE_STRMAP \
__KHASH_IMPL(str, static kh_inline, const char *, void *, 1, kh_str_hash_func, kh_str_hash_equal)
int git_strmap_alloc(git_strmap **map); int git_strmap_alloc(git_strmap **map);
#define git_strmap_free(h) git_strmap__free(h); (h) = NULL #define git_strmap_free(h) git_strmap__free(h); (h) = NULL
......
...@@ -19,8 +19,6 @@ ...@@ -19,8 +19,6 @@
#include "git2/sys/refs.h" #include "git2/sys/refs.h"
#include "git2/sys/refdb_backend.h" #include "git2/sys/refdb_backend.h"
GIT__USE_STRMAP
typedef enum { typedef enum {
TRANSACTION_NONE, TRANSACTION_NONE,
TRANSACTION_REFS, TRANSACTION_REFS,
......
...@@ -20,8 +20,6 @@ ...@@ -20,8 +20,6 @@
#define TREE_ENTRY_CHECK_NAMELEN(n) \ #define TREE_ENTRY_CHECK_NAMELEN(n) \
if (n > UINT16_MAX) { giterr_set(GITERR_INVALID, "tree entry path too long"); } if (n > UINT16_MAX) { giterr_set(GITERR_INVALID, "tree entry path too long"); }
GIT__USE_STRMAP
static bool valid_filemode(const int filemode) static bool valid_filemode(const int filemode)
{ {
return (filemode == GIT_FILEMODE_TREE return (filemode == GIT_FILEMODE_TREE
......
#include "clar_libgit2.h" #include "clar_libgit2.h"
#include "strmap.h" #include "strmap.h"
GIT__USE_STRMAP
git_strmap *g_table; git_strmap *g_table;
void test_core_strmap__initialize(void) void test_core_strmap__initialize(void)
......
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