lua-users home
lua-l archive

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


> If you initialize a luaL_Buffer object with luaL_buffinit(), must you always
> call luaL_pushresult(), or can you abandon it altogether? From reading the
> Lua 5.2 source code in lauxlib.c it looks like it's okay to abandon it, but
> I was wondering if this is reliable behavior or something that could change
> in the future.

It is reliable. Otherwise it would be almost unusable, because most
operations to create the strings to be added to the buffer may raise a
memory error.

-- Roberto