aboutsummaryrefslogtreecommitdiff
path: root/lauxlib.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-11-11 17:59:17 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-11-11 17:59:17 -0200
commitef900f224c4afdc33e31ca39e95ae8d1ac9dfd3b (patch)
tree591d997487ecaabb008f12c966acf29153d9c9c5 /lauxlib.h
parent3105febf9a6d79edfcd5cb50451cfa5a61016c76 (diff)
downloadlua-ef900f224c4afdc33e31ca39e95ae8d1ac9dfd3b.tar.gz
lua-ef900f224c4afdc33e31ca39e95ae8d1ac9dfd3b.tar.bz2
lua-ef900f224c4afdc33e31ca39e95ae8d1ac9dfd3b.zip
strutcture for file handles exported in 'lauxlib.h'
Diffstat (limited to 'lauxlib.h')
-rw-r--r--lauxlib.h27
1 files changed, 26 insertions, 1 deletions
diff --git a/lauxlib.h b/lauxlib.h
index 2ec7e50c..5f6de7c7 100644
--- a/lauxlib.h
+++ b/lauxlib.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lauxlib.h,v 1.116 2011/04/08 19:17:36 roberto Exp roberto $ 2** $Id: lauxlib.h,v 1.117 2011/06/16 14:10:12 roberto Exp roberto $
3** Auxiliary functions for building Lua libraries 3** Auxiliary functions for building Lua libraries
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -163,6 +163,31 @@ LUALIB_API char *(luaL_buffinitsize) (lua_State *L, luaL_Buffer *B, size_t sz);
163/* }====================================================== */ 163/* }====================================================== */
164 164
165 165
166
167/*
168** {======================================================
169** File handles for IO library
170** =======================================================
171*/
172
173/*
174** A file handle is a userdata with metatable 'LUA_FILEHANDLE' and
175** initial structure 'luaIO_Stream' (it may contain other fields
176** after that initial structure).
177*/
178
179#define LUA_FILEHANDLE "FILE*"
180
181
182typedef struct luaIO_Stream {
183 FILE *f; /* stream (NULL for incompletely created streams) */
184 lua_CFunction closef; /* to close stream (NULL for closed streams) */
185} luaIO_Stream;
186
187/* }====================================================== */
188
189
190
166/* compatibility with old module system */ 191/* compatibility with old module system */
167#if defined(LUA_COMPAT_MODULE) 192#if defined(LUA_COMPAT_MODULE)
168 193