LUA_READER(3) Library Functions Manual LUA_READER(3)

lua_Readerreader function used by lua_load(3)

#include <lua.h>

typedef const char *
(*lua_Reader)(lua_State *L, void *data, size_t *size);

The reader function () used by lua_load(3). Every time it needs another piece of the chunk, lua_load(3) calls the reader, passing along its data parameter. The reader must return a pointer to a block of memory with a new piece of the chunk and set size to the block size. The block must exist until the reader function is called again. To signal the end of the chunk, the reader must return NULL or set size to zero. The reader function may return pieces of any size greater than zero.

lua_load(3)

Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes, Lua 5.1 Reference Manual.

The lua_Reader() manual page is based on Lua Reference Manual 5.1 and was created by Sergey Bronnikov.

July 15, 2022 Debian