youlu-cn / luacrc16

crc16 for lua
MIT License
1 stars 6 forks source link

unknown type name ‘luaL_reg’ #1

Closed crazy4chrissi closed 7 years ago

crazy4chrissi commented 7 years ago

Comiling with Lua 5.2 causes the above error.

From http://lua-users.org/wiki/CompatibilityWithLuaFive :

luaL_reg (Lua 5.0) changed its name to luaL_Reg since Lua 5.1. This could be solved with conditional compilation:

#if !defined LUA_VERSION_NUM
/* Lua 5.0 */
#define luaL_Reg luaL_reg
#endif
youlu-cn commented 7 years ago

Thanks, I will fix it