aboutsummaryrefslogtreecommitdiff
path: root/liolib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-03-06 17:09:38 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-03-06 17:09:38 -0300
commit6d4db86888ea8ef06b78646f2631891c9e4c7a2b (patch)
tree7a7b19dc6b3d786f4f974e702bf69eac9775b70f /liolib.c
parente9a38203700865d36c3b2861200674a21930c1b5 (diff)
downloadlua-6d4db86888ea8ef06b78646f2631891c9e4c7a2b.tar.gz
lua-6d4db86888ea8ef06b78646f2631891c9e4c7a2b.tar.bz2
lua-6d4db86888ea8ef06b78646f2631891c9e4c7a2b.zip
open functions are lua_Cfunctions
Diffstat (limited to 'liolib.c')
-rw-r--r--liolib.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/liolib.c b/liolib.c
index 5325dc4c..e1703ba7 100644
--- a/liolib.c
+++ b/liolib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: liolib.c,v 1.108 2001/02/23 17:17:25 roberto Exp roberto $ 2** $Id: liolib.c,v 1.109 2001/02/23 17:28:12 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*/
@@ -675,7 +675,7 @@ static const luaL_reg iolib[] = {
675}; 675};
676 676
677 677
678LUALIB_API void lua_iolibopen (lua_State *L) { 678LUALIB_API int lua_iolibopen (lua_State *L) {
679 int iotag = lua_newtype(L, FILEHANDLE, LUA_TUSERDATA); 679 int iotag = lua_newtype(L, FILEHANDLE, LUA_TUSERDATA);
680 lua_newtype(L, l_s("ClosedFileHandle"), LUA_TUSERDATA); 680 lua_newtype(L, l_s("ClosedFileHandle"), LUA_TUSERDATA);
681 luaL_openl(L, iolib); 681 luaL_openl(L, iolib);
@@ -688,5 +688,6 @@ LUALIB_API void lua_iolibopen (lua_State *L) {
688 /* close files when collected */ 688 /* close files when collected */
689 lua_pushcfunction(L, file_collect); 689 lua_pushcfunction(L, file_collect);
690 lua_settagmethod(L, iotag, l_s("gc")); 690 lua_settagmethod(L, iotag, l_s("gc"));
691 return 0;
691} 692}
692 693