[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: Can i get bytecode of a function
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 26 Aug 2003 18:47:49 -0300
>lua_dump is not documented (and I can assume what a ChunkWriter is, but I
>can only hope that I don't interpret it wrong -- well OK I can analyze the
>code, but documentation would be nice).
Sorry about the lack of documentation.
A writer function, of type lua_Chunkwriter, is a function
int writer (lua_State *L, const void* p, size_t sz, void* ud);
that is supposed to "write" sz byte starting at p. The pointer ud is used
to keep any state that is needed, for instance, a FILE* if you're writing
to a file.
For an example of use, see writer in luac.c or in str_dump in lstrlib.c.