summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/luatexdir/lua/luastuff.w
diff options
context:
space:
mode:
authorLuigi Scarso <luigi.scarso@gmail.com>2018-01-09 23:43:20 +0000
committerLuigi Scarso <luigi.scarso@gmail.com>2018-01-09 23:43:20 +0000
commitaa5d0e8bf3515c424ba0594a2d4e06ae31da7796 (patch)
treee56fd10d89732547ddb207c1998a1ded4360382e /Build/source/texk/web2c/luatexdir/lua/luastuff.w
parentd33684eeca435784c95c62c7981dd02f7818b263 (diff)
Imported Luatex 1.06.3 (Lua 5.2.4)
git-svn-id: svn://tug.org/texlive/trunk@46269 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/lua/luastuff.w')
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/luastuff.w28
1 files changed, 0 insertions, 28 deletions
diff --git a/Build/source/texk/web2c/luatexdir/lua/luastuff.w b/Build/source/texk/web2c/luatexdir/lua/luastuff.w
index 6f57e8ee845..7274a683637 100644
--- a/Build/source/texk/web2c/luatexdir/lua/luastuff.w
+++ b/Build/source/texk/web2c/luatexdir/lua/luastuff.w
@@ -619,34 +619,6 @@ void preset_environment(lua_State * L, const parm_struct * p, const char *s)
luajit compatibility layer for luatex lua5.2
*/
#ifdef LuajitTeX
-LUALIB_API void *luaL_testudata (lua_State *L, int ud, const char *tname) {
- void *p = lua_touserdata(L, ud);
- if (p != NULL) { /* value is a userdata? */
- if (lua_getmetatable(L, ud)) { /* does it have a metatable? */
- luaL_getmetatable(L, tname); /* get correct metatable */
- if (!lua_rawequal(L, -1, -2)) /* not the same? */
- p = NULL; /* value is a userdata with wrong metatable */
- lua_pop(L, 2); /* remove both metatables */
- return p;
- }
- }
- return NULL; /* value is not a userdata with a metatable */
-}
-
-@ @c
-/* It's not ok. See lua-users.org/wiki/CompatibilityWithLuaFive for another solution */
-LUALIB_API void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) {
- /*luaL_checkversion(L);*/
- luaL_checkstack(L, nup, "too many upvalues");
- for (; l->name != NULL; l++) { /* fill the table with given functions */
- int i;
- for (i = 0; i < nup; i++) /* copy upvalues to the top */
- lua_pushvalue(L, -nup);
- lua_pushcclosure(L, l->func, nup); /* closure with those upvalues */
- lua_setfield(L, -(nup + 2), l->name);
- }
- lua_pop(L, nup); /* remove upvalues */
-}
@ @c
LUALIB_API char *luaL_prepbuffsize (luaL_Buffer *B, size_t sz) {