LUA: Re-introduce support for loadfile to load actual files

This commit is contained in:
Paul Gilbert 2020-01-05 19:35:02 -08:00 committed by Paul Gilbert
parent 7c03d7d983
commit ae58f79d18
4 changed files with 89 additions and 19 deletions

View file

@ -557,7 +557,7 @@ LUALIB_API int luaL_loadfile (lua_State *L, const char *filename) {
lf.extraline = 0;
lua_pushfstring(L, "@%s", filename);
lf.f = new Lua::LuaFileProxy(filename, "r");
lf.f = Lua::LuaFileProxy::create(filename, "r");
/*
if (filename == NULL) {
lua_pushliteral(L, "=stdin");