diff --git a/collects/mrlib/cache-image-snip.ss b/collects/mrlib/cache-image-snip.ss index 4fdc9d4a..fd2b60d8 100644 --- a/collects/mrlib/cache-image-snip.ss +++ b/collects/mrlib/cache-image-snip.ss @@ -139,20 +139,18 @@ ;; ;; snip-class ;; - + (define cache-image-snip-class% (class snip-class% (define/override (read f) - (let ([data (read-from-string (bytes->string/utf-8 (send f get-bytes)) - void - (lambda (x) #f))]) + (let ([data (read-from-string (send f get-bytes) (lambda () #f))]) (if data - (argb->cache-image-snip (make-argb (first data) (second data)) - (third data) - (fourth data)) - (make-null-cache-image-snip)))) + (argb->cache-image-snip (make-argb (first data) (second data)) + (third data) + (fourth data)) + (make-null-cache-image-snip)))) (super-new))) - + (define snip-class (new cache-image-snip-class%)) (send snip-class set-version 1) (send snip-class set-classname (format "~s" `(lib "cache-image-snip.ss" "mrlib"))) @@ -655,4 +653,4 @@ for b3, we have: [argb? (any/c . -> . boolean?)] [make-argb ((vectorof (integer-in 0 255)) integer? . -> . argb?)] [argb-vector (argb? . -> . (vectorof (integer-in 0 255)))] - [argb-width (argb? . -> . integer?)])) \ No newline at end of file + [argb-width (argb? . -> . integer?)])) diff --git a/collects/mrlib/syntax-browser.ss b/collects/mrlib/syntax-browser.ss index f3486f3d..12541194 100644 --- a/collects/mrlib/syntax-browser.ss +++ b/collects/mrlib/syntax-browser.ss @@ -36,8 +36,8 @@ needed to really make this work: (define syntax-snipclass% (class snip-class% (define/override (read stream) - (let ([str (send stream get-bytes)]) - (make-object syntax-snip% (unmarshall-syntax (read-from-string (bytes->string/utf-8 str)))))) + (make-object syntax-snip% + (unmarshall-syntax (read-from-string (send stream get-bytes))))) (super-instantiate ()))) (define snip-class (make-object syntax-snipclass%))