Skip to content
Snippets Groups Projects
Commit 8bd8ecd0 authored by Felix Fietkau's avatar Felix Fietkau
Browse files

iwinfo: remove old lua compat macros


Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>

SVN-Revision: 40816
parent 4c9fc236
No related branches found
No related tags found
No related merge requests found
...@@ -45,18 +45,6 @@ ...@@ -45,18 +45,6 @@
#define LUA_REG(type,op) \ #define LUA_REG(type,op) \
{ #op, iwinfo_L_##type##_##op } { #op, iwinfo_L_##type##_##op }
#define LUA_WRAP_INT(type,op) \
static int iwinfo_L_##type##_##op(lua_State *L) \
{ \
const char *ifname = luaL_checkstring(L, 1); \
int rv; \
if( !type##_get_##op(ifname, &rv) ) \
lua_pushnumber(L, rv); \
else \
lua_pushnil(L); \
return 1; \
}
#define LUA_WRAP_INT_OP(type,op) \ #define LUA_WRAP_INT_OP(type,op) \
static int iwinfo_L_##type##_##op(lua_State *L) \ static int iwinfo_L_##type##_##op(lua_State *L) \
{ \ { \
...@@ -69,19 +57,6 @@ ...@@ -69,19 +57,6 @@
return 1; \ return 1; \
} }
#define LUA_WRAP_STRING(type,op) \
static int iwinfo_L_##type##_##op(lua_State *L) \
{ \
const char *ifname = luaL_checkstring(L, 1); \
char rv[IWINFO_BUFSIZE]; \
memset(rv, 0, IWINFO_BUFSIZE); \
if( !type##_get_##op(ifname, rv) ) \
lua_pushstring(L, rv); \
else \
lua_pushnil(L); \
return 1; \
}
#define LUA_WRAP_STRING_OP(type,op) \ #define LUA_WRAP_STRING_OP(type,op) \
static int iwinfo_L_##type##_##op(lua_State *L) \ static int iwinfo_L_##type##_##op(lua_State *L) \
{ \ { \
...@@ -95,12 +70,6 @@ ...@@ -95,12 +70,6 @@
return 1; \ return 1; \
} }
#define LUA_WRAP_STRUCT(type,op) \
static int iwinfo_L_##type##_##op(lua_State *L) \
{ \
return iwinfo_L_##op(L, type##_get_##op); \
}
#define LUA_WRAP_STRUCT_OP(type,op) \ #define LUA_WRAP_STRUCT_OP(type,op) \
static int iwinfo_L_##type##_##op(lua_State *L) \ static int iwinfo_L_##type##_##op(lua_State *L) \
{ \ { \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment