diff options
Diffstat (limited to 'lua.h')
-rw-r--r-- | lua.h | 20 |
1 files changed, 11 insertions, 9 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lua.h,v 1.133 2002/05/16 18:39:46 roberto Exp roberto $ | 2 | ** $Id: lua.h,v 1.134 2002/05/23 20:29:05 roberto Exp roberto $ |
3 | ** Lua - An Extensible Extension Language | 3 | ** Lua - An Extensible Extension Language |
4 | ** Tecgraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil | 4 | ** Tecgraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil |
5 | ** e-mail: info@lua.org | 5 | ** e-mail: info@lua.org |
@@ -51,6 +51,11 @@ typedef struct lua_State lua_State; | |||
51 | typedef int (*lua_CFunction) (lua_State *L); | 51 | typedef int (*lua_CFunction) (lua_State *L); |
52 | 52 | ||
53 | 53 | ||
54 | /* | ||
55 | ** function for loading Lua code | ||
56 | */ | ||
57 | typedef const char * (*lua_Getblock) (void *ud, size_t *size); | ||
58 | |||
54 | 59 | ||
55 | /* | 60 | /* |
56 | ** basic types | 61 | ** basic types |
@@ -176,9 +181,8 @@ LUA_API void lua_setmetatable (lua_State *L, int objindex); | |||
176 | */ | 181 | */ |
177 | LUA_API void lua_rawcall (lua_State *L, int nargs, int nresults); | 182 | LUA_API void lua_rawcall (lua_State *L, int nargs, int nresults); |
178 | LUA_API int lua_pcall (lua_State *L, int nargs, int nresults, int errf); | 183 | LUA_API int lua_pcall (lua_State *L, int nargs, int nresults, int errf); |
179 | LUA_API int lua_loadfile (lua_State *L, const char *filename); | 184 | LUA_API int lua_load (lua_State *L, lua_Getblock getblock, void *ud, |
180 | LUA_API int lua_loadbuffer (lua_State *L, const char *buff, size_t size, | 185 | int binary, const char *chunkname); |
181 | const char *name); | ||
182 | 186 | ||
183 | 187 | ||
184 | /* | 188 | /* |
@@ -249,11 +253,6 @@ LUA_API void *lua_newuserdata (lua_State *L, size_t size); | |||
249 | ** compatibility macros and functions | 253 | ** compatibility macros and functions |
250 | */ | 254 | */ |
251 | 255 | ||
252 | LUA_API int lua_call (lua_State *L, int nargs, int nresults); | ||
253 | LUA_API int lua_dofile (lua_State *L, const char *filename); | ||
254 | LUA_API int lua_dostring (lua_State *L, const char *str); | ||
255 | LUA_API int lua_dobuffer (lua_State *L, const char *buff, size_t size, | ||
256 | const char *name); | ||
257 | 256 | ||
258 | LUA_API int lua_pushupvalues (lua_State *L); | 257 | LUA_API int lua_pushupvalues (lua_State *L); |
259 | 258 | ||
@@ -292,6 +291,9 @@ LUA_API int lua_pushupvalues (lua_State *L); | |||
292 | ** ======================================================================= | 291 | ** ======================================================================= |
293 | */ | 292 | */ |
294 | 293 | ||
294 | /* binary files start with <esc>Lua */ | ||
295 | #define LUA_SIGNATURE "\033Lua" | ||
296 | |||
295 | /* formats for Lua numbers */ | 297 | /* formats for Lua numbers */ |
296 | #ifndef LUA_NUMBER_SCAN | 298 | #ifndef LUA_NUMBER_SCAN |
297 | #define LUA_NUMBER_SCAN "%lf" | 299 | #define LUA_NUMBER_SCAN "%lf" |