From c8e5a35a68e193f3212fb4838fd1dbd8c81c0bd5 Mon Sep 17 00:00:00 2001 From: luigi Date: Fri, 10 Feb 2017 13:59:45 +0000 Subject: [PATCH] sync with experimental. git-svn-id: https://foundry.supelec.fr/svn/luatex/trunk@6217 0b2b3880-5936-4365-a048-eb17d2e5a6bf --- source/texk/web2c/luatexdir/lua/luainit.w | 4 ++++ source/texk/web2c/luatexdir/lua/luajitstuff.w | 4 ---- source/texk/web2c/luatexdir/lua/luastuff.w | 4 ---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/source/texk/web2c/luatexdir/lua/luainit.w b/source/texk/web2c/luatexdir/lua/luainit.w index 1cd555302..cc630fece 100644 --- a/source/texk/web2c/luatexdir/lua/luainit.w +++ b/source/texk/web2c/luatexdir/lua/luainit.w @@ -1069,6 +1069,10 @@ void lua_initialize(int ac, char **av) fix_dumpname(); } } + /* Maybe we can extend this way to the others tables, using luac. */ + if ( safer_option || ((shellenabledp == 0) || (shellenabledp == 1 && restrictedshell == 1)) ) { + (void) luaL_dostring(Luas,"ffi=require[[ffi]]; for k,_ in pairs(ffi) do if k~='gc' then ffi[k]=nil end; end; ffi=nil;"); + } } @ @c diff --git a/source/texk/web2c/luatexdir/lua/luajitstuff.w b/source/texk/web2c/luatexdir/lua/luajitstuff.w index b29de18c9..f219d5bd6 100644 --- a/source/texk/web2c/luatexdir/lua/luajitstuff.w +++ b/source/texk/web2c/luatexdir/lua/luajitstuff.w @@ -349,10 +349,6 @@ void luainterpreter(void) (void) hide_lua_value(L, "lfs", "rmdir"); (void) hide_lua_value(L, "lfs", "mkdir"); } - /* Maybe we can extend this way to the others tables, using luac. */ - if ( safer_option || ((shellenabledp == 0) || (shellenabledp == 1 && restrictedshell == 1)) ) { - (void) luaL_dostring(L,"ffi=require[[ffi]]; for k,_ in pairs(ffi) do if k~='gc' then ffi[k]=nil end ;end; ffi=nil;"); - } /* fprintf(stdout, "\nLuajitTeX default hash function type:%s\n", */ /* jithash_hashname); */ Luas = L; diff --git a/source/texk/web2c/luatexdir/lua/luastuff.w b/source/texk/web2c/luatexdir/lua/luastuff.w index f90f0e180..914730375 100644 --- a/source/texk/web2c/luatexdir/lua/luastuff.w +++ b/source/texk/web2c/luatexdir/lua/luastuff.w @@ -310,10 +310,6 @@ void luainterpreter(void) (void) hide_lua_value(L, "lfs", "rmdir"); (void) hide_lua_value(L, "lfs", "mkdir"); } - /* Maybe we can extend this way to the others tables, using luac. */ - if ( safer_option || ((shellenabledp == 0) || (shellenabledp == 1 && restrictedshell == 1)) ) { - (void) luaL_dostring(L,"ffi=require[[ffi]]; for k,_ in pairs(ffi) do if k~='gc' then ffi[k]=nil end; end; ffi=nil;"); - } Luas = L; } -- 2.11.4.GIT