Re: [ANN] LuaJIT-2.1.0-beta3

  • From: Mike Pall <mikelj-1705@xxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Tue, 2 May 2017 09:26:49 +0200

Andriy Kornatskyy wrote:

Looks like it breaks lua-cjson... used to be fine with beta2... works with 
2.0.5.

# luarocks install lua-cjson
Installing https://luarocks.org/lua-cjson-2.1.0-1.src.rock
gcc -O2 -fPIC -I/usr/local/include -c lua_cjson.c -o lua_cjson.o
lua_cjson.c:1298:13: error: static declaration of 'luaL_setfuncs' follows 
non-static declaration
 static void luaL_setfuncs (lua_State *l, const luaL_Reg *reg, int nup)
             ^~~~~~~~~~~~~

As I said in the GitHub issue:

The lua* namespace is reserved for the VM itself.

Lua/C Modules are not supposed to define any such symbol, not even
for compatibility shims. These may cause conflicts, if multiple
modules use them, too.

[Lua/C Modules are only allowed to define luaopen_* symbols.]

--Mike

Other related posts: