6 Commits

Author SHA1 Message Date
Roberto I
2a7cf4f319 More effort in avoiding errors in finalizers
Before calling a finalizer, Lua not only checks stack limits, but
actually ensures that a minimum number of slots are already allocated
for the call. (If it cannot ensure that, it postpones the finalizer.)
That avoids finalizers not running due to memory errors that the
programmer cannot control.
2026-01-11 15:36:03 -03:00
Roberto I
e44f3a2ffc Global initialization checks name conflict
Initialization "global a = 10" raises an error if global 'a' is already
defined, that is, it has a non-nil value.
2025-11-08 11:43:42 -03:00
Roberto I
d342328e5b Vertical bar removed from syntax of vararg table
The syntax 'function foo (a, b, ...arg)' is already used by JavaScript
for this same semantics, so it seems natural to use the same notation in
Lua.
2025-10-30 11:07:01 -03:00
Roberto I
30a7b93439 Two new memory tests
For external strings and for vararg tables.
2025-10-12 15:13:28 -03:00
Roberto Ierusalimschy
ab66652b32 Removed copyright notice from 'testes/all.lua'
All test files refer to the main copyright notice in 'lua.h'.
2025-03-12 14:00:58 -03:00
Roberto Ierusalimschy
4398e488e6 New test file 'memerr.lua'
Tests for memory-allocation errors moved from 'api.lua' to this new
file, as 'api.lua' was already too big. (Besides, these tests have
nothing to do with the API.)
2025-03-12 13:52:35 -03:00