]> git.madduck.net Git - etc/awesome.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Merge pull request #420 from sim590/unpack-lua51-compat
authorLuca CPZ <1777696+lcpz@users.noreply.github.com>
Thu, 14 Feb 2019 15:26:41 +0000 (15:26 +0000)
committerGitHub <noreply@github.com>
Thu, 14 Feb 2019 15:26:41 +0000 (15:26 +0000)
util/menu_iterator: retro compatibility with lua 5.1

helpers.lua
util/menu_iterator.lua

index 4d75f7b6067f7eb9d5430eeac9e5cedbd785e06c..d3fa2597c22e8659c4674925c19d128ccec5fd23 100644 (file)
@@ -12,7 +12,8 @@ local io         = { lines = io.lines,
                      open  = io.open }
 local pairs      = pairs
 local rawget     = rawget
-local table      = { sort  = table.sort }
+local table      = { sort  = table.sort, unpack = table.unpack }
+local unpack     = unpack or table.unpack -- lua 5.1 retro-compatibility
 
 -- Lain helper functions for internal use
 -- lain.helpers
index 0ea4e0e2d2f9cdf6bf0c30fbe9b093dc66e5aeb0..9959b2589d4b40f3fedfa2453d6b87a8ece6dda9 100644 (file)
 -- lain.util.menu_iterator
 
 local naughty = require("naughty")
+local helpers = require("lain.helpers")
 local util    = require("lain.util")
 local atable  = require("awful.util").table
 local assert  = assert
 local pairs   = pairs
 local tconcat = table.concat
-local unpack  = unpack
+local unpack = unpack or table.unpack -- lua 5.1 retro-compatibility
 
 local state = { cid = nil }