From 8d66041ae560f53e107649c288e0f22e5101cc2b Mon Sep 17 00:00:00 2001 From: Alexander M Pickering Date: Mon, 23 Sep 2024 15:35:03 -0500 Subject: Corrected patch --- luarocks.exe.c.patch | 70 ++++++++++++++++++++++++++-------------------------- 1 file changed, 35 insertions(+), 35 deletions(-) (limited to 'luarocks.exe.c.patch') diff --git a/luarocks.exe.c.patch b/luarocks.exe.c.patch index 5410bfc..a8c022f 100644 --- a/luarocks.exe.c.patch +++ b/luarocks.exe.c.patch @@ -1,47 +1,47 @@ ---- luarocks.exe.c 2024-09-23 15:27:52.663551300 -0500 -+++ luarocks.exe.c.orig 2024-09-23 15:25:00.870448000 -0500 -@@ -17,33 +17,6 @@ +--- luarocks.exe.c 2024-09-23 15:25:00.870448000 -0500 ++++ luarocks.exe.c 2024-09-23 15:27:52.663551300 -0500 +@@ -17,6 +17,33 @@ #define getprogname() #endif --/* LUA_OK defined in lua 5.2+ */ --#ifndef LUA_OK --#define LUA_OK 0 --#endif -- --/* luaL_traceback() introduced in lua 5.2 */ --#ifndef luaL_traceback --static inline void --luaL_traceback(lua_State *L, lua_State *L1, const char *msg, int level){ -- lua_getfield(L, LUA_GLOBALSINDEX, "debug"); -- if(!lua_istable(L,-1)){ -- lua_pop(L,1); -- return; -- } -- lua_getfield(L, -1, "traceback"); -- if(!lua_isfunction(L,-1)){ -- lua_pop(L,2); -- return; -- } -- lua_pushthread(L1); -- lua_pushstring(L,msg); -- lua_pushnumber(L,level); -- lua_call(L,3,1); -- return; --} --#endif -- ++/* LUA_OK defined in lua 5.2+ */ ++#ifndef LUA_OK ++#define LUA_OK 0 ++#endif ++ ++/* luaL_traceback() introduced in lua 5.2 */ ++#ifndef luaL_traceback ++static inline void ++luaL_traceback(lua_State *L, lua_State *L1, const char *msg, int level){ ++ lua_getfield(L, LUA_GLOBALSINDEX, "debug"); ++ if(!lua_istable(L,-1)){ ++ lua_pop(L,1); ++ return; ++ } ++ lua_getfield(L, -1, "traceback"); ++ if(!lua_isfunction(L,-1)){ ++ lua_pop(L,2); ++ return; ++ } ++ lua_pushthread(L1); ++ lua_pushstring(L,msg); ++ lua_pushnumber(L,level); ++ lua_call(L,3,1); ++ return; ++} ++#endif ++ static int registry_key; /* fatal error, from srlua */ -@@ -38309,9 +38282,7 @@ +@@ -38282,7 +38309,9 @@ lua_pop(L, 1); lua_getfield(L, -1, "loaders"); /* table table.insert package package.loaders */ } -- /* lua_copy introduced in lua 5.2 */ -- lua_replace(L,3); -- //lua_copy(L, 4, 3); /* table table.insert package.searchers */ -+ lua_copy(L, 4, 3); /* table table.insert package.searchers */ +- lua_copy(L, 4, 3); /* table table.insert package.searchers */ ++ /* lua_copy introduced in lua 5.2 */ ++ lua_replace(L,3); ++ //lua_copy(L, 4, 3); /* table table.insert package.searchers */ lua_settop(L, 3); /* table table.insert package.searchers */ lua_pushnumber(L, 1); /* table table.insert package.searchers 1 */ lua_pushcfunction(L, pkg_loader); /* table table.insert package.searchers 1 pkg_loader */ -- cgit v1.2.3-55-g6feb