aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-11-30 15:51:05 +0800
committerGitHub <noreply@github.com>2023-11-30 15:51:05 +0800
commit543e0256c19f397921a332e06b423215fd9aecb5 (patch)
tree5517c44128bc3a0763fc9789565b78c56e49d690 /src/nvim/api
parent85be914879d49435c3b689efd5f1dae70e81d168 (diff)
downloadrneovim-543e0256c19f397921a332e06b423215fd9aecb5.tar.gz
rneovim-543e0256c19f397921a332e06b423215fd9aecb5.tar.bz2
rneovim-543e0256c19f397921a332e06b423215fd9aecb5.zip
build: don't define FUNC_ATTR_* as empty in headers (#26317)
FUNC_ATTR_* should only be used in .c files with generated headers. Defining FUNC_ATTR_* as empty in headers causes misuses of them to be silently ignored. Instead don't define them by default, and only define them as empty after a .c file has included its generated header.
Diffstat (limited to 'src/nvim/api')
-rw-r--r--src/nvim/api/autocmd.c1
-rw-r--r--src/nvim/api/buffer.c1
-rw-r--r--src/nvim/api/command.c1
-rw-r--r--src/nvim/api/deprecated.c1
-rw-r--r--src/nvim/api/extmark.c1
-rw-r--r--src/nvim/api/options.c1
-rw-r--r--src/nvim/api/private/converter.c1
-rw-r--r--src/nvim/api/private/helpers.c1
-rw-r--r--src/nvim/api/tabpage.c5
-rw-r--r--src/nvim/api/ui.c1
-rw-r--r--src/nvim/api/vim.c1
-rw-r--r--src/nvim/api/vimscript.c1
-rw-r--r--src/nvim/api/win_config.c1
-rw-r--r--src/nvim/api/window.c5
14 files changed, 8 insertions, 14 deletions
diff --git a/src/nvim/api/autocmd.c b/src/nvim/api/autocmd.c
index 08d9d8e117..2ce08bdf40 100644
--- a/src/nvim/api/autocmd.c
+++ b/src/nvim/api/autocmd.c
@@ -17,7 +17,6 @@
#include "nvim/buffer.h"
#include "nvim/eval/typval.h"
#include "nvim/ex_cmds_defs.h"
-#include "nvim/func_attr.h"
#include "nvim/globals.h"
#include "nvim/lua/executor.h"
#include "nvim/memory.h"
diff --git a/src/nvim/api/buffer.c b/src/nvim/api/buffer.c
index 0df231868d..9d0ac5d6ef 100644
--- a/src/nvim/api/buffer.c
+++ b/src/nvim/api/buffer.c
@@ -24,7 +24,6 @@
#include "nvim/drawscreen.h"
#include "nvim/ex_cmds.h"
#include "nvim/extmark.h"
-#include "nvim/func_attr.h"
#include "nvim/globals.h"
#include "nvim/lua/executor.h"
#include "nvim/mapping.h"
diff --git a/src/nvim/api/command.c b/src/nvim/api/command.c
index 2a57ce9a19..7116f4bce0 100644
--- a/src/nvim/api/command.c
+++ b/src/nvim/api/command.c
@@ -18,7 +18,6 @@
#include "nvim/ex_cmds.h"
#include "nvim/ex_docmd.h"
#include "nvim/ex_eval.h"
-#include "nvim/func_attr.h"
#include "nvim/garray.h"
#include "nvim/globals.h"
#include "nvim/lua/executor.h"
diff --git a/src/nvim/api/deprecated.c b/src/nvim/api/deprecated.c
index 2ec11236d7..11795033cc 100644
--- a/src/nvim/api/deprecated.c
+++ b/src/nvim/api/deprecated.c
@@ -14,7 +14,6 @@
#include "nvim/buffer_defs.h"
#include "nvim/decoration.h"
#include "nvim/extmark.h"
-#include "nvim/func_attr.h"
#include "nvim/globals.h"
#include "nvim/highlight.h"
#include "nvim/highlight_group.h"
diff --git a/src/nvim/api/extmark.c b/src/nvim/api/extmark.c
index d71498d6ed..80b1546329 100644
--- a/src/nvim/api/extmark.c
+++ b/src/nvim/api/extmark.c
@@ -17,7 +17,6 @@
#include "nvim/decoration_provider.h"
#include "nvim/drawscreen.h"
#include "nvim/extmark.h"
-#include "nvim/func_attr.h"
#include "nvim/grid.h"
#include "nvim/highlight_group.h"
#include "nvim/marktree.h"
diff --git a/src/nvim/api/options.c b/src/nvim/api/options.c
index c012a69c7b..9cf91bad42 100644
--- a/src/nvim/api/options.c
+++ b/src/nvim/api/options.c
@@ -11,7 +11,6 @@
#include "nvim/autocmd.h"
#include "nvim/buffer.h"
#include "nvim/eval/window.h"
-#include "nvim/func_attr.h"
#include "nvim/globals.h"
#include "nvim/macros_defs.h"
#include "nvim/memory.h"
diff --git a/src/nvim/api/private/converter.c b/src/nvim/api/private/converter.c
index 90023171e5..ef57bde32d 100644
--- a/src/nvim/api/private/converter.c
+++ b/src/nvim/api/private/converter.c
@@ -11,7 +11,6 @@
#include "nvim/eval/typval.h"
#include "nvim/eval/typval_defs.h"
#include "nvim/eval/userfunc.h"
-#include "nvim/func_attr.h"
#include "nvim/lua/executor.h"
#include "nvim/memory.h"
#include "nvim/types_defs.h"
diff --git a/src/nvim/api/private/helpers.c b/src/nvim/api/private/helpers.c
index be39836a5b..b23684aee9 100644
--- a/src/nvim/api/private/helpers.c
+++ b/src/nvim/api/private/helpers.c
@@ -20,7 +20,6 @@
#include "nvim/eval/typval_defs.h"
#include "nvim/eval/vars.h"
#include "nvim/ex_eval.h"
-#include "nvim/func_attr.h"
#include "nvim/garray.h"
#include "nvim/globals.h"
#include "nvim/highlight_group.h"
diff --git a/src/nvim/api/tabpage.c b/src/nvim/api/tabpage.c
index c854a22477..303f2ca817 100644
--- a/src/nvim/api/tabpage.c
+++ b/src/nvim/api/tabpage.c
@@ -6,11 +6,14 @@
#include "nvim/api/tabpage.h"
#include "nvim/api/vim.h"
#include "nvim/buffer_defs.h"
-#include "nvim/func_attr.h"
#include "nvim/globals.h"
#include "nvim/memory.h"
#include "nvim/window.h"
+#ifdef INCLUDE_GENERATED_DECLARATIONS
+# include "api/tabpage.c.generated.h"
+#endif
+
/// Gets the windows in a tabpage
///
/// @param tabpage Tabpage handle, or 0 for current tabpage
diff --git a/src/nvim/api/ui.c b/src/nvim/api/ui.c
index 836a68546c..7e64ce9cd1 100644
--- a/src/nvim/api/ui.c
+++ b/src/nvim/api/ui.c
@@ -17,7 +17,6 @@
#include "nvim/eval.h"
#include "nvim/event/loop.h"
#include "nvim/event/wstream.h"
-#include "nvim/func_attr.h"
#include "nvim/globals.h"
#include "nvim/grid.h"
#include "nvim/highlight.h"
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c
index d631b10af9..270f2e4432 100644
--- a/src/nvim/api/vim.c
+++ b/src/nvim/api/vim.c
@@ -31,7 +31,6 @@
#include "nvim/ex_docmd.h"
#include "nvim/ex_eval.h"
#include "nvim/fold.h"
-#include "nvim/func_attr.h"
#include "nvim/getchar.h"
#include "nvim/globals.h"
#include "nvim/grid.h"
diff --git a/src/nvim/api/vimscript.c b/src/nvim/api/vimscript.c
index c75bf21572..25a34f769c 100644
--- a/src/nvim/api/vimscript.c
+++ b/src/nvim/api/vimscript.c
@@ -15,7 +15,6 @@
#include "nvim/eval/typval.h"
#include "nvim/eval/userfunc.h"
#include "nvim/ex_docmd.h"
-#include "nvim/func_attr.h"
#include "nvim/garray.h"
#include "nvim/globals.h"
#include "nvim/memory.h"
diff --git a/src/nvim/api/win_config.c b/src/nvim/api/win_config.c
index 4e23717dc6..825a0583ef 100644
--- a/src/nvim/api/win_config.c
+++ b/src/nvim/api/win_config.c
@@ -13,7 +13,6 @@
#include "nvim/buffer_defs.h"
#include "nvim/decoration.h"
#include "nvim/drawscreen.h"
-#include "nvim/func_attr.h"
#include "nvim/globals.h"
#include "nvim/grid.h"
#include "nvim/highlight_group.h"
diff --git a/src/nvim/api/window.c b/src/nvim/api/window.c
index de5b40940f..d18971c756 100644
--- a/src/nvim/api/window.c
+++ b/src/nvim/api/window.c
@@ -15,7 +15,6 @@
#include "nvim/drawscreen.h"
#include "nvim/eval/window.h"
#include "nvim/ex_docmd.h"
-#include "nvim/func_attr.h"
#include "nvim/gettext.h"
#include "nvim/globals.h"
#include "nvim/lua/executor.h"
@@ -27,6 +26,10 @@
#include "nvim/types_defs.h"
#include "nvim/window.h"
+#ifdef INCLUDE_GENERATED_DECLARATIONS
+# include "api/window.c.generated.h"
+#endif
+
/// Gets the current buffer in a window
///
/// @param window Window handle, or 0 for current window