LUA: Re-introduce support for loadfile to load actual files
This commit is contained in:
parent
7c03d7d983
commit
ae58f79d18
4 changed files with 89 additions and 19 deletions
|
@ -177,7 +177,7 @@ static int io_open (lua_State *L) {
|
|||
const char *filename = luaL_checkstring(L, 1);
|
||||
const char *mode = luaL_optstring(L, 2, "r");
|
||||
Lua::LuaFileProxy **pf = newfile(L);
|
||||
*pf = new Lua::LuaFileProxy(filename, mode);
|
||||
*pf = Lua::LuaFileProxy::create(filename, mode);
|
||||
return (*pf == NULL) ? pushresult(L, 0, filename) : 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue