aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1996-06-18 18:12:23 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1996-06-18 18:12:23 -0300
commitec6677e5512257a42d7d443d6b621b3a2d8e0d43 (patch)
tree84082424bd75f57ed82ddc7da460fae6d0c28d22
parent20cbca699a08b5cf2c01e8e5722ffe3521c04dd9 (diff)
downloadlua-ec6677e5512257a42d7d443d6b621b3a2d8e0d43.tar.gz
lua-ec6677e5512257a42d7d443d6b621b3a2d8e0d43.tar.bz2
lua-ec6677e5512257a42d7d443d6b621b3a2d8e0d43.zip
when "block" is computed, "nentity" == "block". So the change is only
a simpler way to write the same expression.
-rw-r--r--table.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/table.c b/table.c
index c16924cc..1597b0cc 100644
--- a/table.c
+++ b/table.c
@@ -3,7 +3,7 @@
3** Module to control static tables 3** Module to control static tables
4*/ 4*/
5 5
6char *rcs_table="$Id: table.c,v 2.54 1996/05/06 14:29:35 roberto Exp roberto $"; 6char *rcs_table="$Id: table.c,v 2.55 1996/05/28 21:07:32 roberto Exp roberto $";
7 7
8#include "mem.h" 8#include "mem.h"
9#include "opcode.h" 9#include "opcode.h"
@@ -214,7 +214,7 @@ void lua_pack (void)
214 unsigned long recovered = 0; 214 unsigned long recovered = 0;
215 if (nentity++ < block) return; 215 if (nentity++ < block) return;
216 recovered = luaI_collectgarbage(); 216 recovered = luaI_collectgarbage();
217 block = block*2*(1.0 - (float)recovered/nentity); 217 block = 2*(block-recovered);
218 nentity -= recovered; 218 nentity -= recovered;
219} 219}
220 220