iwinfo: remove old lua compat macros
authorFelix Fietkau <nbd@openwrt.org>
Wed, 21 May 2014 12:34:18 +0000 (12:34 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 21 May 2014 12:34:18 +0000 (12:34 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 40816

package/network/utils/iwinfo/src/include/iwinfo/lua.h

index ad7989726052db057f458c00f94c23928b2d74e8..8b76b25556d8e5acbf172bd2322263955c1bba9c 100644 (file)
 #define LUA_REG(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)                                               \
        static int iwinfo_L_##type##_##op(lua_State *L)         \
        {                                                                                                       \
                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)                                            \
        static int iwinfo_L_##type##_##op(lua_State *L)         \
        {                                                                                                       \
                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)                                            \
        static int iwinfo_L_##type##_##op(lua_State *L)         \
        {                                                                                                       \