refactor(build): remove INCLUDE_GENERATED_DECLARATIONS guards

These are not needed after #35129 but making uncrustify still play nice
with them was a bit tricky.

Unfortunately `uncrustify --update-config-with-doc` breaks strings
with backslashes. This issue has been reported upstream,
and in the meanwhile auto-update on every single run has been disabled.
This commit is contained in:
bfredl
2025-08-03 11:16:30 +02:00
parent d19d2b4491
commit 442f297c63
373 changed files with 423 additions and 1172 deletions

View File

@@ -14,6 +14,4 @@
#include "nvim/lua/executor.h" // IWYU pragma: keep
#include "nvim/memory.h" // IWYU pragma: keep
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "lua_api_c_bindings.generated.h" // IWYU pragma: keep
#endif
#include "lua_api_c_bindings.generated.h" // IWYU pragma: keep

View File

@@ -7,9 +7,7 @@
#include "nvim/lua/base64.h"
#include "nvim/memory.h"
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "lua/base64.c.generated.h"
#endif
#include "lua/base64.c.generated.h"
static int nlua_base64_encode(lua_State *L)
{

View File

@@ -2,6 +2,4 @@
#include <lua.h> // IWYU pragma: keep
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "lua/base64.h.generated.h"
#endif
#include "lua/base64.h.generated.h"

View File

@@ -39,9 +39,7 @@ typedef struct {
bool has_type_key; ///< True if type key is present.
} LuaTableProps;
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "lua/converter.c.generated.h"
#endif
#include "lua/converter.c.generated.h"
#define TYPE_IDX_VALUE true
#define VAL_IDX_VALUE false

View File

@@ -19,6 +19,4 @@ enum {
kNluaPushFreeRefs = 0x02, ///< Free luarefs to elide an api_luarefs_free_*() later
};
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "lua/converter.h.generated.h"
#endif
#include "lua/converter.h.generated.h"

View File

@@ -95,10 +95,8 @@ typedef struct {
size_t size;
} ModuleDef;
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "lua/executor.c.generated.h"
# include "lua/vim_module.generated.h"
#endif
#include "lua/executor.c.generated.h"
#include "lua/vim_module.generated.h"
#define PUSH_ALL_TYPVALS(lstate, args, argcount, special) \
for (int i = 0; i < argcount; i++) { \

View File

@@ -50,9 +50,7 @@ enum { CB_MAX_ERROR = 3, };
/// To use with kRetNilBool for quick truthiness check
#define LUARET_TRUTHY(res) ((res).type == kObjectTypeBoolean && (res).data.boolean == true)
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "lua/executor.h.generated.h"
#endif
#include "lua/executor.h.generated.h"
EXTERN nlua_ref_state_t *nlua_global_refs INIT( = NULL);
EXTERN bool nlua_disable_preload INIT( = false);

View File

@@ -12,9 +12,7 @@
#include "nvim/memory.h"
#include "nvim/message.h"
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "lua/secure.c.generated.h"
#endif
#include "lua/secure.c.generated.h"
char *nlua_read_secure(const char *path)
{

View File

@@ -2,6 +2,4 @@
#include "nvim/ex_cmds_defs.h" // IWYU pragma: keep
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "lua/secure.h.generated.h"
#endif
#include "lua/secure.h.generated.h"

View File

@@ -15,9 +15,7 @@
#include "nvim/message.h"
#include "nvim/spell.h"
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "lua/spell.c.generated.h" // IWYU pragma: keep
#endif
#include "lua/spell.c.generated.h" // IWYU pragma: keep
int nlua_spell_check(lua_State *lstate)
FUNC_ATTR_NONNULL_ALL

View File

@@ -2,6 +2,4 @@
#include <lua.h> // IWYU pragma: keep
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "lua/spell.h.generated.h"
#endif
#include "lua/spell.h.generated.h"

View File

@@ -47,9 +47,7 @@
#include "nvim/types_defs.h"
#include "nvim/window.h"
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "lua/stdlib.c.generated.h"
#endif
#include "lua/stdlib.c.generated.h"
static int regex_match(lua_State *lstate, regprog_T **prog, char *str)
{

View File

@@ -3,6 +3,4 @@
#include <lua.h> // IWYU pragma: keep
#include <stdbool.h>
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "lua/stdlib.h.generated.h"
#endif
#include "lua/stdlib.h.generated.h"

View File

@@ -60,9 +60,7 @@ typedef struct {
uint64_t timeout_threshold_ns;
} TSLuaParserCallbackPayload;
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "lua/treesitter.c.generated.h"
#endif
#include "lua/treesitter.c.generated.h"
static PMap(cstr_t) langs = MAP_INIT;

View File

@@ -5,8 +5,6 @@
#include "nvim/macros_defs.h"
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "lua/treesitter.h.generated.h"
#endif
#include "lua/treesitter.h.generated.h"
EXTERN uint64_t tslua_query_parse_count INIT( = 0);

View File

@@ -37,9 +37,7 @@ typedef struct {
bool iwhite;
} hunkpriv_t;
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "lua/xdiff.c.generated.h"
#endif
#include "lua/xdiff.c.generated.h"
static void lua_pushhunk(lua_State *lstate, long start_a, long count_a, long start_b, long count_b)
{

View File

@@ -2,6 +2,4 @@
#include <lua.h> // IWYU pragma: keep
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "lua/xdiff.h.generated.h"
#endif
#include "lua/xdiff.h.generated.h"