diff options
author | Patrick Steinhardt <ps@pks.im> | 2019-02-21 12:13:59 +0100 |
---|---|---|
committer | Patrick Steinhardt <ps@pks.im> | 2019-02-21 12:28:02 +0100 |
commit | b63396b75fe26afa3b27259c0d13dd7bc13b53ba (patch) | |
tree | 35feccd200b172e876d660b309bb216f4515df88 | |
parent | 9eb098d8614bdd0365140f6614441465123ce903 (diff) | |
download | libgit2-b63396b75fe26afa3b27259c0d13dd7bc13b53ba.tar.gz |
allocators: move standard allocator into subdirectory
Right now, our two allocator implementations are scattered around
the tree in "stdalloc.h" and "win32/w32_crtdbg_stacktrace.h".
Start grouping them together in a single directory "allocators/",
similar to how e.g. our streams are organized.
-rw-r--r-- | src/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/alloc.c | 2 | ||||
-rw-r--r-- | src/allocators/stdalloc.c (renamed from src/stdalloc.c) | 0 | ||||
-rw-r--r-- | src/allocators/stdalloc.h (renamed from src/stdalloc.h) | 8 |
4 files changed, 6 insertions, 5 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5ad8b1447..b056c9a9b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -428,6 +428,7 @@ ELSE() FILE(GLOB SRC_OS unix/*.c unix/*.h) ENDIF() FILE(GLOB SRC_GIT2 *.c *.h + allocators/*.c allocators/*.h streams/*.c streams/*.h transports/*.c transports/*.h xdiff/*.c xdiff/*.h) diff --git a/src/alloc.c b/src/alloc.c index 8d4a19476..5ff41517b 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -10,7 +10,7 @@ #if defined(GIT_MSVC_CRTDBG) # include "win32/w32_crtdbg_stacktrace.h" #else -# include "stdalloc.h" +# include "allocators/stdalloc.h" #endif git_allocator git__allocator; diff --git a/src/stdalloc.c b/src/allocators/stdalloc.c index c4938e32b..c4938e32b 100644 --- a/src/stdalloc.c +++ b/src/allocators/stdalloc.c diff --git a/src/stdalloc.h b/src/allocators/stdalloc.h index a8927a507..fa23fe6e3 100644 --- a/src/stdalloc.h +++ b/src/allocators/stdalloc.h @@ -5,13 +5,13 @@ * a Linking Exception. For full terms see the included COPYING file. */ -#ifndef INCLUDE_stdalloc_h__ -#define INCLUDE_stdalloc_h__ - -#include "alloc.h" +#ifndef INCLUDE_allocators_stdalloc_h__ +#define INCLUDE_allocators_stdalloc_h__ #include "common.h" +#include "alloc.h" + int git_stdalloc_init_allocator(git_allocator *allocator); #endif |