Skip to content

Commit

Permalink
fix: lua export
Browse files Browse the repository at this point in the history
  • Loading branch information
notegorkaa authored Jan 15, 2025
1 parent 5452834 commit 2b8d181
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion luaiconv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 2b8d181

Please sign in to comment.