The `port-commit-peeked' function (used by `regexp-match-evt') was
deeply broken with respect to `file-position' and `port-next-location'.
I see no workaround for old versions, but the problem is now fixed in
the current development version (in the git repo).
At Sat, 11 Jun 2011 07:19:03 -0700, Ma
Thanks for the report!
I think the bug is more specifically in the implementation of
`port-commit-peeked' for some kinds of ports, since the following
program also has the wrong result:
#lang racket/base
(define-values (in out) (make-pipe))
(display "12345" out)
(peek-bytes 3 0 in)
(port-com
In the following program, (sync (regexp-match-evt #rx"^..." in)) returns
'(#"123") but (file-position in) returns 0 instead of 3:
#lang racket/base
(require racket/port)
(define-values (in out) (make-pipe))
(display "12345" out)
(sync (regexp-match-evt #rx"^..." in))
(file-position in)
Tha
3 matches
Mail list logo