davidm / luacom

Microsoft Component Object Model (COM) binding for Lua
http://lua-users.org/wiki/LuaCom
Other
117 stars 52 forks source link

Lua53 fixes #23

Open greatwolf opened 4 years ago

greatwolf commented 4 years ago

Did some various fixes particular to CMake detection so it can better find later versions of Lua as well as LuaJIT.

Also had to fix some of the lua C calls carryover from pre Lua 5.2, like luaL_register and lua_strlen. I know LUA_COMPAT_MODULE can be defined for backwards compatibility but it assumes that the lua runtime has luaL_openlib compiled in (luaL_register is a #define into luaL_openlib. I ran into linking issues since my runtime didn't have it.

It seems to make more sense to just make luacom use the latest Lua C api and put any compatibility code in LuaCompat.* to smooth out version differences. It helps reduce #ifdef litter into other source files.

Last thing, added a rockspec file that uses cmake to build since it's already in the project.