0001-Lua-5.3-compatibility.patch 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. From 2d824d2fce31b6a9cc60b2c3f215fbbf1d99c611 Mon Sep 17 00:00:00 2001
  2. From: mpeterv <mpeterval@gmail.com>
  3. Date: Thu, 3 Dec 2015 13:10:14 +0300
  4. Subject: [PATCH] Lua 5.3 compatibility
  5. Fetched from: https://github.com/keplerproject/wsapi/commit/2d824d2fce31b6a9cc60b2c3f215fbbf1d99c611
  6. Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
  7. ---
  8. src/wsapi/ringer.lua | 1 +
  9. src/wsapi/util.lua | 2 +-
  10. 2 files changed, 2 insertions(+), 1 deletion(-)
  11. diff --git a/src/wsapi/ringer.lua b/src/wsapi/ringer.lua
  12. index 58309f2..db7b68f 100644
  13. --- a/src/wsapi/ringer.lua
  14. +++ b/src/wsapi/ringer.lua
  15. @@ -5,6 +5,7 @@ local rings = require "rings"
  16. local _M = {}
  17. local init = [==[
  18. + local loadstring = loadstring or load
  19. local app_name, bootstrap_code, is_file = ...
  20. if bootstrap_code then
  21. local bootstrap, err
  22. diff --git a/src/wsapi/util.lua b/src/wsapi/util.lua
  23. index 24d3cfe..34e5816 100644
  24. --- a/src/wsapi/util.lua
  25. +++ b/src/wsapi/util.lua
  26. @@ -174,7 +174,7 @@ function _M.make_env_post(pd, type, qs)
  27. end
  28. function _M.loadfile(filename, env)
  29. - if _VERSION == "Lua 5.2" then
  30. + if _VERSION ~= "Lua 5.1" then
  31. return loadfile(filename, "bt", env)
  32. else
  33. local f, err = loadfile(filename)
  34. --
  35. 2.14.1