diff options
Diffstat (limited to 'lauxlib.h')
-rw-r--r-- | lauxlib.h | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lauxlib.h,v 1.117 2011/06/16 14:10:12 roberto Exp roberto $ | 2 | ** $Id: lauxlib.h,v 1.118 2011/11/11 19:59:17 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 | */ |
@@ -72,7 +72,11 @@ LUALIB_API int (luaL_execresult) (lua_State *L, int stat); | |||
72 | LUALIB_API int (luaL_ref) (lua_State *L, int t); | 72 | LUALIB_API int (luaL_ref) (lua_State *L, int t); |
73 | LUALIB_API void (luaL_unref) (lua_State *L, int t, int ref); | 73 | LUALIB_API void (luaL_unref) (lua_State *L, int t, int ref); |
74 | 74 | ||
75 | LUALIB_API int (luaL_loadfile) (lua_State *L, const char *filename); | 75 | LUALIB_API int (luaL_loadfilex) (lua_State *L, const char *filename, |
76 | const char *mode); | ||
77 | |||
78 | #define luaL_loadfile(L,f) luaL_loadfilex(L,f,NULL) | ||
79 | |||
76 | LUALIB_API int (luaL_loadbuffer) (lua_State *L, const char *buff, size_t sz, | 80 | LUALIB_API int (luaL_loadbuffer) (lua_State *L, const char *buff, size_t sz, |
77 | const char *name); | 81 | const char *name); |
78 | LUALIB_API int (luaL_loadstring) (lua_State *L, const char *s); | 82 | LUALIB_API int (luaL_loadstring) (lua_State *L, const char *s); |
@@ -172,17 +176,17 @@ LUALIB_API char *(luaL_buffinitsize) (lua_State *L, luaL_Buffer *B, size_t sz); | |||
172 | 176 | ||
173 | /* | 177 | /* |
174 | ** A file handle is a userdata with metatable 'LUA_FILEHANDLE' and | 178 | ** A file handle is a userdata with metatable 'LUA_FILEHANDLE' and |
175 | ** initial structure 'luaIO_Stream' (it may contain other fields | 179 | ** initial structure 'luaL_Stream' (it may contain other fields |
176 | ** after that initial structure). | 180 | ** after that initial structure). |
177 | */ | 181 | */ |
178 | 182 | ||
179 | #define LUA_FILEHANDLE "FILE*" | 183 | #define LUA_FILEHANDLE "FILE*" |
180 | 184 | ||
181 | 185 | ||
182 | typedef struct luaIO_Stream { | 186 | typedef struct luaL_Stream { |
183 | FILE *f; /* stream (NULL for incompletely created streams) */ | 187 | FILE *f; /* stream (NULL for incompletely created streams) */ |
184 | lua_CFunction closef; /* to close stream (NULL for closed streams) */ | 188 | lua_CFunction closef; /* to close stream (NULL for closed streams) */ |
185 | } luaIO_Stream; | 189 | } luaL_Stream; |
186 | 190 | ||
187 | /* }====================================================== */ | 191 | /* }====================================================== */ |
188 | 192 | ||