sb-unicode backport
This commit is contained in:
@ -76,7 +76,7 @@
|
|||||||
(when (plusp ptr)
|
(when (plusp ptr)
|
||||||
(let* ((in (ystream-in-buffer ystream))
|
(let* ((in (ystream-in-buffer ystream))
|
||||||
(out (ystream-out-buffer ystream))
|
(out (ystream-out-buffer ystream))
|
||||||
(surrogatep (<= #xD800 (elt in (1- ptr)) #xDBFF))
|
(surrogatep (<= #xD800 (rune-code (elt in (1- ptr))) #xDBFF))
|
||||||
n)
|
n)
|
||||||
(when surrogatep
|
(when surrogatep
|
||||||
(decf ptr))
|
(decf ptr))
|
||||||
@ -179,11 +179,11 @@
|
|||||||
(:conc-name "YSTREAM-"))
|
(:conc-name "YSTREAM-"))
|
||||||
(target-stream nil))
|
(target-stream nil))
|
||||||
|
|
||||||
(defmethod flush-ystream ((ystream rod-ystream))
|
(defmethod flush-ystream ((ystream character-stream-ystream))
|
||||||
(write-string (ystream-in-buffer ystream) (ystream-target-stream ystream))
|
(write-string (ystream-in-buffer ystream) (ystream-target-stream ystream))
|
||||||
(setf (ystream-in-ptr ystream) 0))
|
(setf (ystream-in-ptr ystream) 0))
|
||||||
|
|
||||||
(defmethod close-ystream ((ystream rod-ystream))
|
(defmethod close-ystream ((ystream character-stream-ystream))
|
||||||
(ystream-target-stream ystream)))
|
(ystream-target-stream ystream)))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -108,7 +108,7 @@
|
|||||||
(define-maker make-rod-sink make-rod-ystream)
|
(define-maker make-rod-sink make-rod-ystream)
|
||||||
|
|
||||||
#+rune-is-character
|
#+rune-is-character
|
||||||
(define-maker make-character-stream-sink make-character-ystream stream)
|
(define-maker make-character-stream-sink make-character-stream-ystream stream)
|
||||||
|
|
||||||
#-rune-is-character
|
#-rune-is-character
|
||||||
(define-maker make-string-sink/utf8 make-string-ystream/utf8)
|
(define-maker make-string-sink/utf8 make-string-ystream/utf8)
|
||||||
|
|||||||
Reference in New Issue
Block a user