aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancesco Abbate <francesco.bbt@gmail.com>2022-04-19 09:28:36 +0200
committerFrancesco Abbate <francesco.bbt@gmail.com>2022-04-19 09:28:36 +0200
commitfb651b6948a5068c5afb040a342a7c4d17ddfc35 (patch)
treedbf89702ad8a5785153e07229339e01cf569cee5
parent4bceeec5c7deb2391225ac0ba77e11f94638a808 (diff)
downloadlite-xl-master-luajit21-2.0.tar.gz
lite-xl-master-luajit21-2.0.zip
Adapt to use LuaJIT 2.1master-luajit21-2.0
-rw-r--r--src/api/compat.c20
-rw-r--r--src/api/compat.h7
-rw-r--r--subprojects/luajit.wrap2
3 files changed, 1 insertions, 28 deletions
diff --git a/src/api/compat.c b/src/api/compat.c
index 34d0b07c..06ab23b1 100644
--- a/src/api/compat.c
+++ b/src/api/compat.c
@@ -44,26 +44,6 @@ void luaL_requiref (lua_State *L, const char *modname, lua_CFunction openf, int
lua_replace(L, -2);
}
-void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) {
- luaL_checkstack(L, nup+1, "too many upvalues");
- for (; l->name != NULL; l++) { /* fill the table with given functions */
- int i;
- lua_pushstring(L, l->name);
- for (i = 0; i < nup; i++) /* copy upvalues to the top */
- lua_pushvalue(L, -(nup + 1));
- lua_pushcclosure(L, l->func, nup); /* closure with those upvalues */
- lua_settable(L, -(nup + 3)); /* table must be below the upvalues, the name and the closure */
- }
- lua_pop(L, nup); /* remove upvalues */
-}
-
-
-void luaL_setmetatable (lua_State *L, const char *tname) {
- luaL_checkstack(L, 1, "not enough stack slots");
- luaL_getmetatable(L, tname);
- lua_setmetatable(L, -2);
-}
-
void luaL_buffinit (lua_State *L, luaL_Buffer_52 *B) {
/* make it crash if used via pointer to a 5.1-style luaL_Buffer */
B->b.p = NULL;
diff --git a/src/api/compat.h b/src/api/compat.h
index 25b8f96e..30875fea 100644
--- a/src/api/compat.h
+++ b/src/api/compat.h
@@ -20,14 +20,7 @@ typedef struct luaL_Buffer_52 {
} luaL_Buffer_52;
#define luaL_Buffer luaL_Buffer_52
-#define luaL_newlibtable(L, l) \
- (lua_createtable(L, 0, sizeof(l)/sizeof(*(l))-1))
-#define luaL_newlib(L, l) \
- (luaL_newlibtable(L, l), luaL_register(L, NULL, l))
-
extern void luaL_requiref (lua_State *L, const char *modname, lua_CFunction openf, int glb);
-extern void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup);
-extern void luaL_setmetatable (lua_State *L, const char *tname);
extern int luaL_getsubtable (lua_State *L, int i, const char *name);
extern void lua_pushunsigned (lua_State *L, lua_Unsigned n);
extern lua_Unsigned luaL_checkunsigned (lua_State *L, int i);
diff --git a/subprojects/luajit.wrap b/subprojects/luajit.wrap
index 3a55f17b..407a04bc 100644
--- a/subprojects/luajit.wrap
+++ b/subprojects/luajit.wrap
@@ -1,5 +1,5 @@
[wrap-git]
directory = luajit
url = https://github.com/franko/luajit
-revision = v2.0.5-lhelper5
+revision = v2.1.0-beta3-lhelper-1