/* Find out whether table is array-like */
for (lua_pushnil(L); lua_next(L, -2); lua_pop(L, 1))
{
+#ifdef LUA_TINT
if (lua_type(L, -2) != LUA_TNUMBER && lua_type(L, -2) != LUA_TINT)
+#else
+ if (lua_type(L, -2) != LUA_TNUMBER)
+#endif
{
lua_pop(L, 1);
return false;
blobmsg_add_u8(b, key, (uint8_t)lua_toboolean(L, -1));
break;
+#ifdef LUA_TINT
case LUA_TINT:
+#endif
case LUA_TNUMBER:
blobmsg_add_u32(b, key, (uint32_t)lua_tointeger(L, -1));
break;
if ((c = lua_newuserdata(L, sizeof(*c))) != NULL &&
(c->ctx = ubus_connect(sockpath)) != NULL)
{
+ ubus_add_uloop(c->ctx);
c->timeout = timeout;
memset(&c->buf, 0, sizeof(c->buf));
luaL_getmetatable(L, METANAME);