From 7e2bcfd994ccdac05a200d0861650db841a3fbd7 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 27 Aug 2012 19:59:27 -0600 Subject: [PATCH] change -e to flush aftering printing a result Previously, the use of `pretty-print' for `print' by `racket/main' and the use of `transplant-output-port' by `pretty-print' caused a flush to happen. This problem highlights a potential general issue, which is that `pretty-print' happened to always flush its output before, and some programs may accidentally depend on that behavior. --- src/racket/src/eval.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/racket/src/eval.c b/src/racket/src/eval.c index 2c358ccd05..65d138e40a 100644 --- a/src/racket/src/eval.c +++ b/src/racket/src/eval.c @@ -5133,6 +5133,7 @@ static Scheme_Object *do_eval_string_all(Scheme_Object *port, const char *str, S printer = scheme_get_param(scheme_current_config(), MZCONFIG_PRINT_HANDLER); arg[0] = a[i]; scheme_apply(printer, 1, arg); + scheme_flush_output(scheme_get_param(scheme_current_config(), MZCONFIG_OUTPUT_PORT)); } } }