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:

util/menu_iterator: unpack retro compatibility
authorSimon Désaulniers <sim.desaulniers@gmail.com>
Tue, 12 Feb 2019 22:27:39 +0000 (17:27 -0500)
committerSimon Désaulniers <sim.desaulniers@gmail.com>
Wed, 13 Feb 2019 19:19:07 +0000 (14:19 -0500)
* Lua 5.2 renamed `unpack` to `table.unpack`.
* Fix: helpers.lua required.

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 }