feat!: make iconv a non-optional dep

This commit is contained in:
Lewis Russell
2023-01-23 16:33:45 +00:00
committed by GitHub
parent 3b75485043
commit f08051c2e6
12 changed files with 37 additions and 133 deletions

View File

@@ -482,8 +482,6 @@ static int nlua_stricmp(lua_State *const lstate) FUNC_ATTR_NONNULL_ALL
return 1;
}
#if defined(HAVE_ICONV)
/// Convert string from one encoding to another
static int nlua_iconv(lua_State *lstate)
{
@@ -526,8 +524,6 @@ static int nlua_iconv(lua_State *lstate)
return 1;
}
#endif
void nlua_state_add_stdlib(lua_State *const lstate, bool is_thread)
{
if (!is_thread) {
@@ -574,12 +570,10 @@ void nlua_state_add_stdlib(lua_State *const lstate, bool is_thread)
luaopen_spell(lstate);
lua_setfield(lstate, -2, "spell");
#if defined(HAVE_ICONV)
// vim.iconv
// depends on p_ambw, p_emoji
lua_pushcfunction(lstate, &nlua_iconv);
lua_setfield(lstate, -2, "iconv");
#endif
}
// vim.mpack