diff options
author | bfredl <bjorn.linse@gmail.com> | 2024-04-27 09:21:46 +0200 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2024-04-27 18:59:48 +0200 |
commit | 3711a0387a96d6531f3ae07a9b18fb8e2afc2e41 (patch) | |
tree | 091b6e0ba6baed32d421fbd46846c8661da64132 /src/nvim/generators | |
parent | 435dee74bb3593b778328138dac054f26e2d7396 (diff) | |
download | rneovim-3711a0387a96d6531f3ae07a9b18fb8e2afc2e41.tar.gz rneovim-3711a0387a96d6531f3ae07a9b18fb8e2afc2e41.tar.bz2 rneovim-3711a0387a96d6531f3ae07a9b18fb8e2afc2e41.zip |
refactor(build): make all generated c files headers
There's no "rule" or bad practice or whatever that says we cannot
generate c files. it is is just that we have ~20 generated headers
and ~2 generated sources and there is nothing in these two generated
source files which sets them aparts. Lua bindings are not different from
rpc bindings, and pathdef is not different from versiondef.
So to simplify build logic and ease the future port to build.zig,
streamline the build to only have generated headers, no direct generated
.c files.
Also "nlua_add_api_functions" had its prototype duplicated twice which
defeated the point of having mandatory prototypes (one source of truth).
Diffstat (limited to 'src/nvim/generators')
-rw-r--r-- | src/nvim/generators/gen_api_dispatch.lua | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/nvim/generators/gen_api_dispatch.lua b/src/nvim/generators/gen_api_dispatch.lua index b0f169ea6f..8ad5858c12 100644 --- a/src/nvim/generators/gen_api_dispatch.lua +++ b/src/nvim/generators/gen_api_dispatch.lua @@ -716,23 +716,6 @@ end -- start building lua output output = assert(io.open(lua_c_bindings_outputf, 'wb')) -output:write([[ -#include <lua.h> -#include <lualib.h> -#include <lauxlib.h> - -#include "nvim/ex_docmd.h" -#include "nvim/ex_getln.h" -#include "nvim/func_attr.h" -#include "nvim/globals.h" -#include "nvim/api/private/defs.h" -#include "nvim/api/private/helpers.h" -#include "nvim/api/private/dispatch.h" -#include "nvim/lua/converter.h" -#include "nvim/lua/executor.h" -#include "nvim/memory.h" - -]]) include_headers(output, headers) output:write('\n') @@ -975,8 +958,6 @@ end output:write(string.format( [[ void nlua_add_api_functions(lua_State *lstate) - REAL_FATTR_NONNULL_ALL; -void nlua_add_api_functions(lua_State *lstate) { lua_createtable(lstate, 0, %u); ]], |