You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-lang/lua/files/5.1.3/10_all_gc_loop_fix.upstream...

20 lines
629 B

--- lua-5.1.3.orig/src/lapi.c 2008-05-15 09:24:32.000000000 +0200
+++ lua-5.1.3/src/lapi.c 2008-08-10 14:26:42.000000000 +0200
@@ -930,10 +930,13 @@
g->GCthreshold = g->totalbytes - a;
else
g->GCthreshold = 0;
- while (g->GCthreshold <= g->totalbytes)
+ while (g->GCthreshold <= g->totalbytes) {
luaC_step(L);
- if (g->gcstate == GCSpause) /* end of cycle? */
- res = 1; /* signal it */
+ if (g->gcstate == GCSpause) { /* end of cycle? */
+ res = 1; /* signal it */
+ break;
+ }
+ }
break;
}
case LUA_GCSETPAUSE: {