lua-users home
lua-l archive

when to __declspec? (was: bit32 for Lua 5.1?)

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Jan 19, 2011, at 6:09 PM, Luiz Henrique de Figueiredo wrote:
I suggest adding the
defines below to your define section at the top:
#define LUAMOD_API
#define LUA_BITLIBNAME	"bit32"
#define luaL_newlib(x,y) luaL_register(x,LUA_BITLIBNAME,y)
as a means of adapting the following Lua 5.2 code for use
with Lua 5.1:
LUAMOD_API int luaopen_bit32 (lua_State *L) {
 luaL_newlib(L, bitlib);
 return 1;
}
My question is, why:
#define LUAMOD_API
instead of:
#define LUAMOD_API LUALIB_API
? I have some vague notion that Windows users need the proper
__declspec(...) on their shared-library luaopen_*() functions.
Thanks,
-Sean

AltStyle によって変換されたページ (->オリジナル) /