Re: luaL_Buffer Destruction
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: luaL_Buffer Destruction
- From: Roberto Ierusalimschy <roberto@...>
- Date: 2012年1月19日 16:31:19 -0200
> 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