diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1996-06-18 18:12:23 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1996-06-18 18:12:23 -0300 |
commit | ec6677e5512257a42d7d443d6b621b3a2d8e0d43 (patch) | |
tree | 84082424bd75f57ed82ddc7da460fae6d0c28d22 | |
parent | 20cbca699a08b5cf2c01e8e5722ffe3521c04dd9 (diff) | |
download | lua-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -3,7 +3,7 @@ | |||
3 | ** Module to control static tables | 3 | ** Module to control static tables |
4 | */ | 4 | */ |
5 | 5 | ||
6 | char *rcs_table="$Id: table.c,v 2.54 1996/05/06 14:29:35 roberto Exp roberto $"; | 6 | char *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 | ||