Project

General

Profile

Feature #2317 ยป 0073-Apply-patch-1-for-lua-5.5.1.patch

Marko Lindqvist, 10/01/2026 05:59 AM

View differences:

dependencies/lua-5.5/Version.txt
(http://www.lua.org/ftp/lua-5.5.1.tar.gz)
Upstream bug fixes from https://www.lua.org/bugs.html applied:
1
Not entire lua distribution directory hierarchy is included here, and
some files needed for Freeciv usage have been added.
dependencies/lua-5.5/src/lgc.c
if (g->gckind == KGC_GENMAJOR) { /* generational mode? */
l_mem numbytes = gettotalbytes(g);
l_mem addedbytes = numbytes - g->GCmajorminor;
l_mem limit = applygcparam(g, MAJORMINOR, addedbytes);
l_mem limit = (addedbytes < 0) ? 0
: applygcparam(g, MAJORMINOR, addedbytes);
l_mem tobecollected = numbytes - g->GCmarked;
if (tobecollected > limit) {
atomic2gen(L, g); /* return to generational mode */
dependencies/lua-5.5/src/lobject.c
l_mem luaO_applyparam (lu_byte p, l_mem x) {
int m = p & 0xF; /* mantissa */
int e = (p >> 4); /* exponent */
lua_assert(x >= 0);
if (e > 0) { /* normalized? */
e--; /* correct exponent */
m += 0x10; /* correct mantissa; maximum value is 0x1F */
    (1-1/1)