aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/lua')
-rw-r--r--src/nvim/lua/converter.c4
-rw-r--r--src/nvim/lua/executor.c9
-rw-r--r--src/nvim/lua/stdlib.c2
-rw-r--r--src/nvim/lua/treesitter.c5
4 files changed, 0 insertions, 20 deletions
diff --git a/src/nvim/lua/converter.c b/src/nvim/lua/converter.c
index 782fc425fc..4d6e6090b8 100644
--- a/src/nvim/lua/converter.c
+++ b/src/nvim/lua/converter.c
@@ -49,7 +49,6 @@ typedef struct {
#define LUA_PUSH_STATIC_STRING(lstate, s) \
lua_pushlstring(lstate, s, sizeof(s) - 1)
-
static LuaTableProps nlua_traverse_table(lua_State *const lstate)
FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT
{
@@ -674,7 +673,6 @@ static inline void nlua_create_typed_table(lua_State *lstate, const size_t narr,
lua_rawset(lstate, -3);
}
-
/// Convert given String to lua string
///
/// Leaves converted string on top of the stack.
@@ -808,7 +806,6 @@ void nlua_push_Object(lua_State *lstate, const Object obj, bool special)
}
}
-
/// Convert lua value to string
///
/// Always pops one value from the stack.
@@ -1297,7 +1294,6 @@ void nlua_init_types(lua_State *const lstate)
lua_rawset(lstate, -3);
}
-
void nlua_pop_keydict(lua_State *L, void *retval, field_hash hashy, Error *err)
{
if (!lua_istable(L, -1)) {
diff --git a/src/nvim/lua/executor.c b/src/nvim/lua/executor.c
index 9758cee0a5..f63f1ee52f 100644
--- a/src/nvim/lua/executor.c
+++ b/src/nvim/lua/executor.c
@@ -135,7 +135,6 @@ static int nlua_pcall(lua_State *lstate, int nargs, int nresults)
return status;
}
-
/// Gets the version of the current Nvim build.
///
/// @param lstate Lua interpreter state.
@@ -147,7 +146,6 @@ static int nlua_nvim_version(lua_State *const lstate) FUNC_ATTR_NONNULL_ALL
return 1;
}
-
static void nlua_luv_error_event(void **argv)
{
char *error = (char *)argv[0];
@@ -1041,7 +1039,6 @@ static int nlua_empty_dict_tostring(lua_State *lstate)
return 1;
}
-
#ifdef WIN32
/// os.getenv: override os.getenv to maintain coherency. #9681
///
@@ -1055,7 +1052,6 @@ static int nlua_getenv(lua_State *lstate)
}
#endif
-
/// add the value to the registry
/// The current implementation does not support calls from threads.
LuaRef nlua_ref(lua_State *lstate, nlua_ref_state_t *ref_state, int index)
@@ -1074,7 +1070,6 @@ LuaRef nlua_ref(lua_State *lstate, nlua_ref_state_t *ref_state, int index)
return ref;
}
-
LuaRef nlua_ref_global(lua_State *lstate, int index)
{
return nlua_ref(lstate, nlua_global_refs, index);
@@ -1100,7 +1095,6 @@ void nlua_unref_global(lua_State *lstate, LuaRef ref)
nlua_unref(lstate, nlua_global_refs, ref);
}
-
void api_free_luaref(LuaRef ref)
{
nlua_unref_global(global_lstate, ref);
@@ -1112,7 +1106,6 @@ void nlua_pushref(lua_State *lstate, LuaRef ref)
lua_rawgeti(lstate, LUA_REGISTRYINDEX, ref);
}
-
/// Gets a new reference to an object stored at original_ref
///
/// NOTE: It does not copy the value, it creates a new ref to the lua object.
@@ -1130,7 +1123,6 @@ LuaRef api_new_luaref(LuaRef original_ref)
return new_ref;
}
-
/// Evaluate lua string
///
/// Used for luaeval().
@@ -1744,7 +1736,6 @@ char_u *nlua_register_table_as_callable(typval_T *const arg)
char_u *name = register_cfunc(&nlua_CFunction_func_call,
&nlua_CFunction_func_free, state);
-
lua_pop(lstate, 1); // []
assert(top == lua_gettop(lstate));
diff --git a/src/nvim/lua/stdlib.c b/src/nvim/lua/stdlib.c
index 79e21e518c..432cb25adc 100644
--- a/src/nvim/lua/stdlib.c
+++ b/src/nvim/lua/stdlib.c
@@ -349,7 +349,6 @@ static dict_T *nlua_get_var_scope(lua_State *lstate)
return dict;
}
-
int nlua_setvar(lua_State *lstate)
{
// non-local return if not found
@@ -470,7 +469,6 @@ static int nlua_stricmp(lua_State *const lstate) FUNC_ATTR_NONNULL_ALL
return 1;
}
-
void nlua_state_add_stdlib(lua_State *const lstate, bool is_thread)
{
if (!is_thread) {
diff --git a/src/nvim/lua/treesitter.c b/src/nvim/lua/treesitter.c
index d3693207ec..6ec9cfd21d 100644
--- a/src/nvim/lua/treesitter.c
+++ b/src/nvim/lua/treesitter.c
@@ -529,7 +529,6 @@ static int parser_set_ranges(lua_State *L)
size_t tbl_len = lua_objlen(L, 2);
TSRange *ranges = xmalloc(sizeof(TSRange) * tbl_len);
-
// [ parser, ranges ]
for (size_t index = 0; index < tbl_len; index++) {
lua_rawgeti(L, 2, index + 1); // [ parser, ranges, range ]
@@ -558,7 +557,6 @@ static int parser_get_ranges(lua_State *L)
return 1;
}
-
// Tree methods
/// push tree interface on lua stack.
@@ -656,7 +654,6 @@ static bool node_check(lua_State *L, int index, TSNode *res)
return false;
}
-
static int node_tostring(lua_State *L)
{
TSNode node;
@@ -1059,7 +1056,6 @@ static int query_next_match(lua_State *L)
return 0;
}
-
static int query_next_capture(lua_State *L)
{
// Upvalues are:
@@ -1205,7 +1201,6 @@ int tslua_parse_query(lua_State *L)
return 1;
}
-
static const char *query_err_string(TSQueryError err)
{
switch (err) {