From 209378db60dd355d36427c5847b47d970dbb0771 Mon Sep 17 00:00:00 2001 From: Alexey Melnichuk Date: Mon, 25 Aug 2014 15:07:21 +0500 Subject: [PATCH] Fix. Define export functions. --- src/lcurl.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/lcurl.c b/src/lcurl.c index 0ad2dcc..6997619 100644 --- a/src/lcurl.c +++ b/src/lcurl.c @@ -3,6 +3,12 @@ #include "lcerror.h" #include "lchttppost.h" +/*export*/ +#ifdef _WIN32 +# define LCURL_EXPORT_API __declspec(dllexport) +#else +# define LCURL_EXPORT_API LUALIB_API +#endif static int lcurl_easy_new_safe(lua_State *L){ return lcurl_easy_create(L, LCURL_ERROR_RETURN); @@ -65,9 +71,9 @@ static int luaopen_lcurl_(lua_State *L, const struct luaL_Reg *func){ return 1; } -__declspec(dllexport) +LCURL_EXPORT_API int luaopen_lcurl(lua_State *L){ return luaopen_lcurl_(L, lcurl_functions); } -__declspec(dllexport) +LCURL_EXPORT_API int luaopen_lcurl_safe(lua_State *L){ return luaopen_lcurl_(L, lcurl_functions_safe); }