lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Tue, Mar 31, 2009 at 3:49 PM, Tom Miles <> wrote:
> What is meant by a chunk in this case?
A piece of input. The input data (be it binary compiled, or plain text
source) can be split up into arbitrarily sized 'chunks'.

> What use is the data parameter used for?
The data argument is an opaque value passed to the reader function
(from lua_load documentation). Commonly it'll point to some kind of
data loading structure which you pass to lua_load.

> What point is the state in this case for that matter, and is it valid to manipulate it?
It is valid to manipulate, for example the standard global load()
function uses it to call a Lua function to get the input chunks.