From b408abe3043f4b6c6c4fff3b333ee42cf11d4458 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 26 Jan 2023 13:43:12 +0530 Subject: [PATCH] Move compile_commands.json to build directory --- .gitignore | 3 +-- kitty/data-types.c | 2 +- kitty/graphics.c | 2 +- setup.py | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 0a6a62d73..e8738abbc 100644 --- a/.gitignore +++ b/.gitignore @@ -9,8 +9,6 @@ /build/ /linux-package/ /kitty.app/ -/compile_commands.json -/link_commands.json /glad/out/ /kitty/launcher/kitt* /tools/cmd/at/*_generated.go @@ -22,5 +20,6 @@ __pycache__/ /docs/generated/ /.mypy_cache .DS_Store +.cache bypy/b bypy/virtual-machines.conf diff --git a/kitty/data-types.c b/kitty/data-types.c index 8ac86be43..3bf598573 100644 --- a/kitty/data-types.c +++ b/kitty/data-types.c @@ -40,7 +40,7 @@ #include static PyObject* -user_cache_dir() { +user_cache_dir(void) { static char buf[1024]; if (!confstr(_CS_DARWIN_USER_CACHE_DIR, buf, sizeof(buf) - 1)) return PyErr_SetFromErrno(PyExc_OSError); return PyUnicode_FromString(buf); diff --git a/kitty/graphics.c b/kitty/graphics.c index e0dc5aa35..26fd84d51 100644 --- a/kitty/graphics.c +++ b/kitty/graphics.c @@ -60,7 +60,7 @@ cache_size(const GraphicsManager *self) { return disk_cache_total_size(self->dis GraphicsManager* -grman_alloc() { +grman_alloc(void) { GraphicsManager *self = (GraphicsManager *)GraphicsManager_Type.tp_alloc(&GraphicsManager_Type, 0); self->images_capacity = self->capacity = 64; self->images = calloc(self->images_capacity, sizeof(Image)); diff --git a/setup.py b/setup.py index 4a509118c..c24d5e99b 100755 --- a/setup.py +++ b/setup.py @@ -667,7 +667,7 @@ class CompilationDatabase: def __enter__(self) -> 'CompilationDatabase': self.all_keys: Set[CompileKey] = set() - self.dbpath = os.path.abspath('compile_commands.json') + self.dbpath = os.path.abspath(os.path.join('build', 'compile_commands.json')) self.linkdbpath = os.path.join(os.path.dirname(self.dbpath), 'link_commands.json') try: with open(self.dbpath) as f: