From dfd0d4b8ca3607ae39b1d2cbad4e3a7180dd6754 Mon Sep 17 00:00:00 2001 From: Marc Jakobi Date: Wed, 21 Jan 2026 22:40:19 +0100 Subject: fix(compat): duplicate symbol when linking with luajit on windows (#81) --- src/compat.c | 2 +- src/compat.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compat.c b/src/compat.c index 2d2bec9..0842496 100644 --- a/src/compat.c +++ b/src/compat.c @@ -1,7 +1,7 @@ #include #include -#if LUA_VERSION_NUM == 501 +#if LUA_VERSION_NUM == 501 && !defined(LUAJIT_VERSION) 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 */ diff --git a/src/compat.h b/src/compat.h index 2033aa3..f9e07ad 100644 --- a/src/compat.h +++ b/src/compat.h @@ -4,7 +4,7 @@ #include #include -#if LUA_VERSION_NUM == 501 +#if LUA_VERSION_NUM == 501 && !defined(LUAJIT_VERSION) void luaL_setfuncs(lua_State *L, const luaL_Reg *l, int nup); void *luaL_testudata(lua_State *L, int ud, const char *tname); #endif -- cgit v1.2.3-55-g6feb