calaos / calaos_base

Calaos server
https://calaos.fr
GNU General Public License v3.0
160 stars 37 forks source link

Lua 5.2 or Lua Jit #86

Closed naguirre closed 9 years ago

naguirre commented 9 years ago

support luat 5.2 or LuaJit in future version. Current stable version of Lua is 5.2, which breacks API with lua 5.1. We have to port the current calaos code using 5.1 to 5.2 Here the list of api changes :

Lua 5.1 API incompatibility with Lua 5.2 beta rc-2

==Removed== LUA_GLOBALSINDEX LUA_ENVIRONINDEX lua_getfenv lua_setfenv luaL_typerror luaL_putchar lua_yield

==Compat removed == luaI_openlib luaL_getn luaL_setn lua_ref lua_unref lua_getref lua_open lua_getregistry lua_getgccount lua_Chunkreader lua_Chunkwriter luaL_reg

==Requires LUA_COMPAT_ALL== lua_cpcall lua_strlen lua_objlen lua_equal lua_lessthan

==Signature changed== lua_pushlstring lua_pushstring

==Structure changed== luaL_Buffer lua_Debug

naguirre commented 9 years ago

Current calaos verion seems to use a c++ binding comming from lua wiki. It seems that this code is not compatbile with 5.2 version. This one seems compatible, but it's not the same api at all : http://lua-users.org/wiki/LunaFive

raoulh commented 9 years ago

luajit allows to keep api compatibility with lua5.1. I updated the configure.ac to build with luajit instead of lua: https://github.com/calaos/calaos_base/tree/luajit