Use names defined in lualib.h for library registration.
This commit is contained in:
@@ -504,10 +504,10 @@ static GCobj *io_std_new(lua_State *L, FILE *fp, const char *name)
|
||||
LUALIB_API int luaopen_io(lua_State *L)
|
||||
{
|
||||
lj_lib_pushcf(L, lj_cf_io_lines_iter, FF_io_lines_iter);
|
||||
LJ_LIB_REG_(L, NULL, io_method);
|
||||
LJ_LIB_REG(L, NULL, io_method);
|
||||
copyTV(L, L->top, L->top-1); L->top++;
|
||||
lua_setfield(L, LUA_REGISTRYINDEX, LUA_FILEHANDLE);
|
||||
LJ_LIB_REG(L, io);
|
||||
LJ_LIB_REG(L, LUA_IOLIBNAME, io);
|
||||
setgcref(G(L)->gcroot[GCROOT_IO_INPUT], io_std_new(L, stdin, "stdin"));
|
||||
setgcref(G(L)->gcroot[GCROOT_IO_OUTPUT], io_std_new(L, stdout, "stdout"));
|
||||
io_std_new(L, stderr, "stderr");
|
||||
|
||||
Reference in New Issue
Block a user