summaryrefslogtreecommitdiff
path: root/lua.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-10-25 18:31:28 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-10-25 18:31:28 -0300
commit118e9cd843d2956d64b86bfdd70f89919153e471 (patch)
tree1b847891b5d725bd34b9335cd47fb982a904ea8b /lua.h
parentde00d0d0add8686917bc28b7fe0f2974c155f22e (diff)
downloadlua-118e9cd843d2956d64b86bfdd70f89919153e471.tar.gz
lua-118e9cd843d2956d64b86bfdd70f89919153e471.tar.bz2
lua-118e9cd843d2956d64b86bfdd70f89919153e471.zip
new facility for dumping chunks
Diffstat (limited to 'lua.h')
-rw-r--r--lua.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/lua.h b/lua.h
index f95ef4fd..3fef586d 100644
--- a/lua.h
+++ b/lua.h
@@ -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*/
57typedef const char * (*lua_Chunkreader) (lua_State *L, void *ud, size_t *sz); 57typedef const char * (*lua_Chunkreader) (lua_State *L, void *ud, size_t *sz);
58 58
59typedef 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);
192LUA_API int lua_load (lua_State *L, lua_Chunkreader reader, void *dt, 195LUA_API int lua_load (lua_State *L, lua_Chunkreader reader, void *dt,
193 const char *chunkname); 196 const char *chunkname);
194 197
198LUA_API int lua_dump (lua_State *L, lua_Chunkwriter writer, void *data);
199
195 200
196/* 201/*
197** coroutine functions 202** coroutine functions