[MLton-commit] r6564
Matthew Fluet
fluet at mlton.org
Mon Apr 7 11:55:49 PDT 2008
Fix argument checking for thread-current-shrink
----------------------------------------------------------------------
U mlton/trunk/runtime/gc/init.c
----------------------------------------------------------------------
Modified: mlton/trunk/runtime/gc/init.c
===================================================================
--- mlton/trunk/runtime/gc/init.c 2008-04-07 18:55:46 UTC (rev 6563)
+++ mlton/trunk/runtime/gc/init.c 2008-04-07 18:55:48 UTC (rev 6564)
@@ -217,7 +217,8 @@
if (i == argc)
die ("@MLton thread-current-shrink-ratio missing argument.");
s->controls.ratios.threadCurrentShrink = stringToFloat (argv[i++]);
- unless (1.0 < s->controls.ratios.threadCurrentShrink)
+ unless (0.0 <= s->controls.ratios.threadCurrentShrink
+ and s->controls.ratios.threadCurrentShrink <= 1.0)
die ("@MLton thread-current-shrink-ratio argument must be between 0.0 and 1.0.");
} else if (0 == strcmp (arg, "thread-max-reserved-ratio")) {
i++;
More information about the MLton-commit
mailing list