I upgraded a machine to version "352", and I get segfaults when I do:<br><br>(define (substitute-thing regex-string string-to-sub text)<br>
;(map display (list "regex-string::" regex-string " string-to-sub::" string-to-sub " text" text)) ;;;debugging<br>
(let ((answer (regexp-replace (bytify regex-string);<br>
(bytify text)<br>
(bytify string-to-sub))))<br>
; (let ((answer (regexp-replace (stringify regex-string)<br>
; (stringify text)<br>
; (stringify string-to-sub))))<br>
(if (equal? answer text)<br>
text<br>
(substitute-thing regex-string string-to-sub answer))))<br>
<br>
<br>But not when i do:<br><br>(define (substitute-thing regex-string string-to-sub text)<br> ;(map display (list "regex-string::" regex-string " string-to-sub::" string-to-sub " text" text)) ;;;debugging
<br>; (let ((answer (regexp-replace (bytify regex-string);<br>; (bytify text)<br>; (bytify string-to-sub))))<br> (let ((answer (regexp-replace (stringify regex-string)
<br> (stringify text)<br> (stringify string-to-sub))))<br> (if (equal? answer text)<br> (stringify text)<br> (substitute-thing regex-string string-to-sub answer))))
<br><br><br>Where bytify and stringify are:<br><br>(define (bytify x)<br> (if (string? x) (string->bytes/utf-8 x) x))<br><br>(define (stringify x)<br> (if (bytes? x) (bytes->string/utf-8 x) x))<br><br><br>I've worked around it for now with bytify but wanted to report it. If it helps, I think my string is long. I'd guess something like 4K.
<br><br>Corey<br clear="all"><br>-- <br>((lambda (y) (y y)) (lambda (y) (y y)))