lua

A copy of the Lua development repository
Log | Files | Refs | README

commit ec6677e5512257a42d7d443d6b621b3a2d8e0d43
parent 20cbca699a08b5cf2c01e8e5722ffe3521c04dd9
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Tue, 18 Jun 1996 18:12:03 -0300

when "block" is computed, "nentity" == "block". So the change is only
a simpler way to write the same expression.

Diffstat:
Mtable.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/table.c b/table.c @@ -3,7 +3,7 @@ ** Module to control static tables */ -char *rcs_table="$Id: table.c,v 2.54 1996/05/06 14:29:35 roberto Exp roberto $"; +char *rcs_table="$Id: table.c,v 2.55 1996/05/28 21:07:32 roberto Exp roberto $"; #include "mem.h" #include "opcode.h" @@ -214,7 +214,7 @@ void lua_pack (void) unsigned long recovered = 0; if (nentity++ < block) return; recovered = luaI_collectgarbage(); - block = block*2*(1.0 - (float)recovered/nentity); + block = 2*(block-recovered); nentity -= recovered; }