From 05c1394fcd77f111b8edf11e96356c457d2b5c3a Mon Sep 17 00:00:00 2001 From: John Szakmeister Date: Sun, 9 Nov 2014 06:00:51 -0500 Subject: [PATCH] Move many includes down to the EXITFREE block. They're unnecessary for the rest of the file, and they're only there at all to help implement `free_all_mem` for use with Clang's Address Sanitizer. So let's move them to avoid any confusion about why they are there. --- src/nvim/memory.c | 59 ++++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/src/nvim/memory.c b/src/nvim/memory.c index 4b24213ecd..d243c4ed95 100644 --- a/src/nvim/memory.c +++ b/src/nvim/memory.c @@ -8,41 +8,12 @@ #include "nvim/vim.h" #include "nvim/misc2.h" -#include "nvim/file_search.h" -#include "nvim/buffer.h" -#include "nvim/charset.h" -#include "nvim/diff.h" -#include "nvim/edit.h" #include "nvim/eval.h" -#include "nvim/ex_cmds.h" -#include "nvim/ex_docmd.h" -#include "nvim/ex_getln.h" -#include "nvim/fileio.h" -#include "nvim/fold.h" -#include "nvim/getchar.h" -#include "nvim/mark.h" -#include "nvim/mbyte.h" #include "nvim/memfile.h" -#include "nvim/memline.h" #include "nvim/memory.h" #include "nvim/message.h" #include "nvim/misc1.h" -#include "nvim/move.h" -#include "nvim/option.h" -#include "nvim/ops.h" -#include "nvim/os_unix.h" -#include "nvim/path.h" -#include "nvim/quickfix.h" -#include "nvim/regexp.h" -#include "nvim/screen.h" -#include "nvim/search.h" -#include "nvim/spell.h" -#include "nvim/syntax.h" -#include "nvim/tag.h" #include "nvim/term.h" -#include "nvim/ui.h" -#include "nvim/window.h" -#include "nvim/os/os.h" #ifdef INCLUDE_GENERATED_DECLARATIONS # include "memory.c.generated.h" @@ -453,6 +424,36 @@ void do_outofmem_msg(size_t size) #if defined(EXITFREE) || defined(PROTO) +#include "nvim/file_search.h" +#include "nvim/buffer.h" +#include "nvim/charset.h" +#include "nvim/diff.h" +#include "nvim/edit.h" +#include "nvim/ex_cmds.h" +#include "nvim/ex_docmd.h" +#include "nvim/ex_getln.h" +#include "nvim/fileio.h" +#include "nvim/fold.h" +#include "nvim/getchar.h" +#include "nvim/mark.h" +#include "nvim/mbyte.h" +#include "nvim/memline.h" +#include "nvim/move.h" +#include "nvim/option.h" +#include "nvim/ops.h" +#include "nvim/os_unix.h" +#include "nvim/path.h" +#include "nvim/quickfix.h" +#include "nvim/regexp.h" +#include "nvim/screen.h" +#include "nvim/search.h" +#include "nvim/spell.h" +#include "nvim/syntax.h" +#include "nvim/tag.h" +#include "nvim/ui.h" +#include "nvim/window.h" +#include "nvim/os/os.h" + /* * Free everything that we allocated. * Can be used to detect memory leaks, e.g., with ccmalloc.