diff options
Diffstat (limited to 'lauxlib.h')
-rw-r--r-- | lauxlib.h | 27 |
1 files changed, 26 insertions, 1 deletions
@@ -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 | |||
182 | typedef 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 | ||