lua-users home
lua-l archive

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


Dirk Laurie <dirk.laurie@gmail.com> wrote:

> Since 5.3.2, there are circumstances in which the table
>    debug.getregistry().LUABOX
> gets created. One such is
>    io.popen"command":read"a"
> when the length of the output is more than a certain size.

Searching the codebase for "LUABOX" reveals that this table is created
in the 'newbox' function in lauxlib.c for the purposes of allocating a
temporary buffer, which may also be stored in a UserData on the stack.

In 'lauxlib.c', under the header "Generic Buffer manipulation" there is
a 'UBox' struct, functions, and macros for for managing these buffers.

~Paige