aboutsummaryrefslogtreecommitdiff
path: root/liolib.c
diff options
context:
space:
mode:
Diffstat (limited to 'liolib.c')
-rw-r--r--liolib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/liolib.c b/liolib.c
index c32a548d..a0464671 100644
--- a/liolib.c
+++ b/liolib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: liolib.c,v 1.2 1997/09/23 14:12:44 roberto Exp roberto $ 2** $Id: liolib.c,v 1.3 1997/10/30 20:29:09 roberto Exp roberto $
3** Standard I/O (and system) library 3** Standard I/O (and system) library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -372,6 +372,7 @@ static struct luaL_reg iolib[] = {
372 372
373void lua_iolibopen (void) 373void lua_iolibopen (void)
374{ 374{
375 luaL_openlib(iolib, (sizeof(iolib)/sizeof(iolib[0])));
375 lua_tagio = lua_newtag(); 376 lua_tagio = lua_newtag();
376 closedtag = lua_newtag(); 377 closedtag = lua_newtag();
377 setfile(stdin, "_INPUT"); 378 setfile(stdin, "_INPUT");
@@ -379,7 +380,6 @@ void lua_iolibopen (void)
379 setfile(stdin, "_STDIN"); 380 setfile(stdin, "_STDIN");
380 setfile(stdout, "_STDOUT"); 381 setfile(stdout, "_STDOUT");
381 setfile(stderr, "_STDERR"); 382 setfile(stderr, "_STDERR");
382 luaL_openlib(iolib, (sizeof(iolib)/sizeof(iolib[0])));
383 lua_pushcfunction(errorfb); 383 lua_pushcfunction(errorfb);
384 lua_seterrormethod(); 384 lua_seterrormethod();
385} 385}