mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 16:10:36 +00:00
The limit shipped at 255, the structural ceiling -- f->nups and LClosure.nupvalues are lu_byte, so that is the most a closure can hold. But the point of the change is that a function valid on a 5.1 client should load here, and 5.1's own MAXUPVALUES is 60. Anything past that is not a compatibility gap, it is an invitation to write something no other client would accept, which is not a thing to be first at. One constant. Nothing in either hook depends on which number it is: the spill path, the stale-clear and the emission loop are unchanged, and the refusal still comes from the engine's own luaY_checklimit, so its message carries whichever limit is in force. Verified in-game: 60 upvalues load and sum correctly, 61 fails with "too many upvalues (limit=60)".