diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-10-25 18:31:28 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-10-25 18:31:28 -0300 |
| commit | 118e9cd843d2956d64b86bfdd70f89919153e471 (patch) | |
| tree | 1b847891b5d725bd34b9335cd47fb982a904ea8b /lua.h | |
| parent | de00d0d0add8686917bc28b7fe0f2974c155f22e (diff) | |
| download | lua-118e9cd843d2956d64b86bfdd70f89919153e471.tar.gz lua-118e9cd843d2956d64b86bfdd70f89919153e471.tar.bz2 lua-118e9cd843d2956d64b86bfdd70f89919153e471.zip | |
new facility for dumping chunks
Diffstat (limited to 'lua.h')
| -rw-r--r-- | lua.h | 9 |
1 files changed, 7 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lua.h,v 1.159 2002/10/22 17:21:25 roberto Exp roberto $ | 2 | ** $Id: lua.h,v 1.160 2002/10/25 20:05:28 roberto Exp roberto $ |
| 3 | ** Lua - An Extensible Extension Language | 3 | ** Lua - An Extensible Extension Language |
| 4 | ** Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil | 4 | ** Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil |
| 5 | ** http://www.lua.org mailto:info@lua.org | 5 | ** http://www.lua.org mailto:info@lua.org |
| @@ -52,10 +52,13 @@ typedef int (*lua_CFunction) (lua_State *L); | |||
| 52 | 52 | ||
| 53 | 53 | ||
| 54 | /* | 54 | /* |
| 55 | ** functions that read blocks when loading Lua chunk | 55 | ** functions that read/write blocks when loading/dumping Lua chunks |
| 56 | */ | 56 | */ |
| 57 | typedef const char * (*lua_Chunkreader) (lua_State *L, void *ud, size_t *sz); | 57 | typedef const char * (*lua_Chunkreader) (lua_State *L, void *ud, size_t *sz); |
| 58 | 58 | ||
| 59 | typedef int (*lua_Chunkwriter) (lua_State *L, const void* p, | ||
| 60 | size_t sz, void* ud); | ||
| 61 | |||
| 59 | 62 | ||
| 60 | /* | 63 | /* |
| 61 | ** basic types | 64 | ** basic types |
| @@ -192,6 +195,8 @@ LUA_API int lua_pcall (lua_State *L, int nargs, int nresults, int errfunc); | |||
| 192 | LUA_API int lua_load (lua_State *L, lua_Chunkreader reader, void *dt, | 195 | LUA_API int lua_load (lua_State *L, lua_Chunkreader reader, void *dt, |
| 193 | const char *chunkname); | 196 | const char *chunkname); |
| 194 | 197 | ||
| 198 | LUA_API int lua_dump (lua_State *L, lua_Chunkwriter writer, void *data); | ||
| 199 | |||
| 195 | 200 | ||
| 196 | /* | 201 | /* |
| 197 | ** coroutine functions | 202 | ** coroutine functions |
