From 0bc53ba4167ed90220c6b74dd4a40d8d3cfc33e6 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 15 Feb 2012 18:35:32 -0700 Subject: [PATCH] `handle-evt' cannot wrap `handle-evt' The prohbition against `handle-evt' on `handle-evt' is as document and as originally intended. I'm not sure why it was allowed. Existing programs that use `handle-evt' incorrectly can break. I found and fixed one incorrect use and one questionable use in the Racket tree (which is a small minority of the uses of `handle-evt' in the tree). original commit: 084278fabcb3416250d7155faef674a31dac60b6 --- collects/mzlib/port.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collects/mzlib/port.rkt b/collects/mzlib/port.rkt index 06dbc01..2a87650 100644 --- a/collects/mzlib/port.rkt +++ b/collects/mzlib/port.rkt @@ -437,7 +437,7 @@ (lambda (s) (let ([r (peek-bytes-avail!* s delta #f orig-in)]) (set! delta (+ delta (if (number? r) r 1))) - (if (eq? r 0) (handle-evt orig-in (lambda (v) 0)) r))) + (if (eq? r 0) (wrap-evt orig-in (lambda (v) 0)) r))) (lambda (s skip default) (peek-bytes-avail!* s (+ delta skip) #f orig-in)) void