fix: lua export (#19)

* fix: lua export
This commit is contained in:
Egor 2025-01-19 21:12:55 +03:00 committed by GitHub
parent 5452834c16
commit 3c729ec869
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -39,6 +39,12 @@
#define LIB_VERSION LIB_NAME " 7"
#define ICONV_TYPENAME "iconv_t"
#ifdef _WIN32
#define LUAEXPORT __declspec(dllexport)
#else
#define LUAEXPORT __attribute__((visibility("default")))
#endif
#if LUA_VERSION_NUM < 501
#error "Unsupported Lua version. You must use Lua >= 5.1"
#endif
@ -229,7 +235,7 @@ static const luaL_Reg iconv_funcs[] = {
};
int luaopen_iconv(lua_State *L)
LUAEXPORT int luaopen_iconv(lua_State *L)
{
luaL_newlib(L, iconv_funcs);