249.patch 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. From 5cfd42c386d3adae6d211fbb4011179c3c141b04 Mon Sep 17 00:00:00 2001
  2. From: Uli Schlachter <psychon@znc.in>
  3. Date: Sun, 2 Aug 2020 16:14:27 +0200
  4. Subject: [PATCH 1/2] Fix the build with Lua 5.4
  5. Lua 5.4 changed the API to lua_resume(). This commit changes the code to
  6. cope with that.
  7. Signed-off-by: Uli Schlachter <psychon@znc.in>
  8. ---
  9. lgi/callable.c | 5 ++++-
  10. 1 file changed, 4 insertions(+), 1 deletion(-)
  11. diff --git a/lgi/callable.c b/lgi/callable.c
  12. index e96d3af4..3234b64f 100644
  13. --- a/lgi/callable.c
  14. +++ b/lgi/callable.c
  15. @@ -1355,7 +1355,10 @@ closure_callback (ffi_cif *cif, void *ret, void **args, void *closure_arg)
  16. }
  17. else
  18. {
  19. -#if LUA_VERSION_NUM >= 502
  20. +#if LUA_VERSION_NUM >= 504
  21. + int nresults;
  22. + res = lua_resume (L, NULL, npos, &nresults);
  23. +#elif LUA_VERSION_NUM >= 502
  24. res = lua_resume (L, NULL, npos);
  25. #else
  26. res = lua_resume (L, npos);
  27. From a2f834c2ebf5c4f523d5ed909b83e2a805237c0a Mon Sep 17 00:00:00 2001
  28. From: Uli Schlachter <psychon@znc.in>
  29. Date: Sun, 2 Aug 2020 16:16:03 +0200
  30. Subject: [PATCH 2/2] Mention Lua 5.4 as "experimentally supported"
  31. Signed-off-by: Uli Schlachter <psychon@znc.in>
  32. ---
  33. README.md | 3 +++
  34. 1 file changed, 3 insertions(+)
  35. diff --git a/README.md b/README.md
  36. index bf11cbec..26a11bd9 100644
  37. --- a/README.md
  38. +++ b/README.md
  39. @@ -14,6 +14,9 @@ LGI is tested and compatible with standard Lua 5.1, Lua 5.2, Lua 5.3 and
  40. LuaJIT2. Compatibility with other Lua implementations is not tested
  41. yet.
  42. +Lua 5.4 is only supported experimentally. It builds, but does not pass the
  43. +test suite. See [#247](https://github.com/pavouk/lgi/issues/247) for details.
  44. +
  45. If you need to support pre-gobject-introspection GTK (ancient GTK+ 2.x
  46. releases), use [Lua-Gnome](http://sourceforge.net/projects/lua-gnome/).