lua-users home
lua-l archive

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

> Basically what I'm stumbling over is the fact that the callback can be
> called x many times, so I need to keep state. I presume that's what the
> second parameter (void* data) is good for?


> My callback offers the complete buffer in the first read, simply because
> it's already in memory and I'm merely telling Lua where to find it.

So why not just use luaL_loadbuffer?

> PS: if you have any sources for more information or even sample
> implementation you can point to, I'd appreciate if you could include those.

Read lauxlib.c and my own ae:   (at Load functions)