diff options
Diffstat (limited to 'src/lib_io.c')
-rw-r--r-- | src/lib_io.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib_io.c b/src/lib_io.c index 19528bb1..307d005c 100644 --- a/src/lib_io.c +++ b/src/lib_io.c | |||
@@ -504,10 +504,10 @@ static GCobj *io_std_new(lua_State *L, FILE *fp, const char *name) | |||
504 | LUALIB_API int luaopen_io(lua_State *L) | 504 | LUALIB_API int luaopen_io(lua_State *L) |
505 | { | 505 | { |
506 | lj_lib_pushcf(L, lj_cf_io_lines_iter, FF_io_lines_iter); | 506 | lj_lib_pushcf(L, lj_cf_io_lines_iter, FF_io_lines_iter); |
507 | LJ_LIB_REG_(L, NULL, io_method); | 507 | LJ_LIB_REG(L, NULL, io_method); |
508 | copyTV(L, L->top, L->top-1); L->top++; | 508 | copyTV(L, L->top, L->top-1); L->top++; |
509 | lua_setfield(L, LUA_REGISTRYINDEX, LUA_FILEHANDLE); | 509 | lua_setfield(L, LUA_REGISTRYINDEX, LUA_FILEHANDLE); |
510 | LJ_LIB_REG(L, io); | 510 | LJ_LIB_REG(L, LUA_IOLIBNAME, io); |
511 | setgcref(G(L)->gcroot[GCROOT_IO_INPUT], io_std_new(L, stdin, "stdin")); | 511 | setgcref(G(L)->gcroot[GCROOT_IO_INPUT], io_std_new(L, stdin, "stdin")); |
512 | setgcref(G(L)->gcroot[GCROOT_IO_OUTPUT], io_std_new(L, stdout, "stdout")); | 512 | setgcref(G(L)->gcroot[GCROOT_IO_OUTPUT], io_std_new(L, stdout, "stdout")); |
513 | io_std_new(L, stderr, "stderr"); | 513 | io_std_new(L, stderr, "stderr"); |