Compare commits

..

No commits in common. "rawhide" and "f43" have entirely different histories.

2 changed files with 1 additions and 41 deletions

View file

@ -1,38 +0,0 @@
diff -up vis-v0.9/vis-lua.c.lua55 vis-v0.9/vis-lua.c
--- vis-v0.9/vis-lua.c.lua55 2026-03-16 16:23:43.668922812 -0400
+++ vis-v0.9/vis-lua.c 2026-03-16 16:25:41.892362312 -0400
@@ -3208,7 +3208,11 @@ static void *alloc_lua(void *ud, void *p
* @function init
*/
void vis_lua_init(Vis *vis) {
+#if LUA_VERSION_NUM >= 505
+ lua_State *L = lua_newstate(alloc_lua, vis, luaL_makeseed(0));
+#else
lua_State *L = lua_newstate(alloc_lua, vis);
+#endif
if (!L)
return;
vis->lua = L;
diff -up vis-v0.9/vis-lua.h.lua55 vis-v0.9/vis-lua.h
--- vis-v0.9/vis-lua.h.lua55 2026-03-16 16:13:13.657846463 -0400
+++ vis-v0.9/vis-lua.h 2026-03-16 16:15:26.159364325 -0400
@@ -14,6 +14,19 @@ typedef void* lua_CFunction;
#include "vis.h"
#include "vis-subprocess.h"
+#if LUA_VERSION_NUM >= 505
+
+#define lua_pushunsigned(L,n) lua_pushinteger(L, (lua_Integer)(n))
+#define lua_tounsignedx(L,i,is) ((lua_Unsigned)lua_tointegerx(L,i,is))
+#define lua_tounsigned(L,i) lua_tounsignedx(L,(i),NULL)
+#define luaL_checkunsigned(L,a) ((lua_Unsigned)luaL_checkinteger(L,a))
+#define luaL_optunsigned(L,a,d) \
+ ((lua_Unsigned)luaL_optinteger(L,a,(lua_Integer)(d)))
+#define luaL_checkint(L,n) ((int)luaL_checkinteger(L, (n)))
+
+#endif
+
+
/* add a directory to consider when loading lua files */
bool vis_lua_path_add(Vis*, const char *path);
/* get semicolon separated list of paths to load lua files

View file

@ -13,7 +13,6 @@ Summary: A vim-like editor with structural regex from plan9
License: ISC AND MIT AND CC0-1.0
URL: https://git.sr.ht/~martanne/%{name}
Source0: https://git.sr.ht/~martanne/%{name}/archive/v%{version}.tar.gz
Patch0: vis-0.9-lua-5.5.patch
BuildRequires: make
BuildRequires: gcc
@ -23,7 +22,6 @@ BuildRequires: pkgconfig(tre)
BuildRequires: pkgconfig(lua) >= 5.2
BuildRequires: libacl-devel
BuildRequires: pkgconfig(libselinux)
BuildRequires: lua-penlight
Requires: lua-lpeg >= 0.12
Requires: xsel
@ -41,7 +39,7 @@ BuildArch: noarch
%{summary}
%prep
%autosetup -n vis-v%{version} -p1
%autosetup -n vis-v%{version}
%build
%configure