lua: Lua 5.3 support #1

Merged
rlahfa merged 1 commit from lua_5_3 into master 2024-09-07 19:38:40 +02:00

View file

@ -809,7 +809,7 @@ LUA_WRAP_STRUCT_OP(wext,hardware_id)
#ifdef USE_WL
/* Broadcom table */
static const luaL_reg R_wl[] = {
static const luaL_Reg R_wl[] = {
LUA_REG(wl,channel),
LUA_REG(wl,frequency),
LUA_REG(wl,frequency_offset),
@ -842,7 +842,7 @@ static const luaL_reg R_wl[] = {
#ifdef USE_MADWIFI
/* Madwifi table */
static const luaL_reg R_madwifi[] = {
static const luaL_Reg R_madwifi[] = {
LUA_REG(madwifi,channel),
LUA_REG(madwifi,frequency),
LUA_REG(madwifi,frequency_offset),
@ -875,7 +875,7 @@ static const luaL_reg R_madwifi[] = {
#ifdef USE_NL80211
/* NL80211 table */
static const luaL_reg R_nl80211[] = {
static const luaL_Reg R_nl80211[] = {
LUA_REG(nl80211,channel),
LUA_REG(nl80211,frequency),
LUA_REG(nl80211,frequency_offset),
@ -908,7 +908,7 @@ static const luaL_reg R_nl80211[] = {
/* Wext table */
#ifdef USE_WEXT
static const luaL_reg R_wext[] = {
static const luaL_Reg R_wext[] = {
LUA_REG(wext,channel),
LUA_REG(wext,frequency),
LUA_REG(wext,frequency_offset),
@ -940,7 +940,7 @@ static const luaL_reg R_wext[] = {
#endif
/* Common */
static const luaL_reg R_common[] = {
static const luaL_Reg R_common[] = {
{ "type", iwinfo_L_type },
{ "__gc", iwinfo_L__gc },
{ NULL, NULL }
@ -948,12 +948,12 @@ static const luaL_reg R_common[] = {
LUALIB_API int luaopen_iwinfo(lua_State *L) {
luaL_register(L, IWINFO_META, R_common);
luaL_setfuncs(L, R_common, 0);
#ifdef USE_WL
luaL_newmetatable(L, IWINFO_WL_META);
luaL_register(L, NULL, R_common);
luaL_register(L, NULL, R_wl);
luaL_setfuncs(L, R_common, 0);
luaL_setfuncs(L, R_wl, 0);
lua_pushvalue(L, -1);
lua_setfield(L, -2, "__index");
lua_setfield(L, -2, "wl");
@ -961,8 +961,8 @@ LUALIB_API int luaopen_iwinfo(lua_State *L) {
#ifdef USE_MADWIFI
luaL_newmetatable(L, IWINFO_MADWIFI_META);
luaL_register(L, NULL, R_common);
luaL_register(L, NULL, R_madwifi);
luaL_setfuncs(L, R_common, 0);
luaL_setfuncs(L, R_madwifi, 0);
lua_pushvalue(L, -1);
lua_setfield(L, -2, "__index");
lua_setfield(L, -2, "madwifi");
@ -970,8 +970,8 @@ LUALIB_API int luaopen_iwinfo(lua_State *L) {
#ifdef USE_NL80211
luaL_newmetatable(L, IWINFO_NL80211_META);
luaL_register(L, NULL, R_common);
luaL_register(L, NULL, R_nl80211);
luaL_setfuncs(L, R_common, 0);
luaL_setfuncs(L, R_nl80211, 0);
lua_pushvalue(L, -1);
lua_setfield(L, -2, "__index");
lua_setfield(L, -2, "nl80211");
@ -979,8 +979,8 @@ LUALIB_API int luaopen_iwinfo(lua_State *L) {
#ifdef USE_WEXT
luaL_newmetatable(L, IWINFO_WEXT_META);
luaL_register(L, NULL, R_common);
luaL_register(L, NULL, R_wext);
luaL_setfuncs(L, R_common, 0);
luaL_setfuncs(L, R_wext, 0);
lua_pushvalue(L, -1);
lua_setfield(L, -2, "__index");
lua_setfield(L, -2, "wext");