[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Bug report: tbc link not updated after rotating the stack.
- From: "balus" <balus@...>
- Date: Fri, 10 Sep 2021 10:01:44 +0800
>>>>> "Andrew" == Andrew Gierth <andrew@tao11.riddles.org.uk> writes:
Andrew> You're explicitly not allowed to do that, see the warnings about usage
Andrew> of the luaL_Buffer api.
Yes, I've read the reference manual again and noticed that:
You can use the stack between successive calls to buffer operations
as long as that use is balanced; that is, when you call a buffer
operation, the stack is at the same level it was immediately after
the previous buffer operation.
It looks like that I misunderstand the warning indeed: I thought it
only forbids me to add any more elements on top of the buffer into
the stack between two successive buffer operations, but has no
restriction to lower the stack by removing elements below the
buffer object.
-- balus