X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fseq.lisp;h=b05450e915a3b5bfb6619aba36a93bea9f6f1ba2;hb=7c5138fcbdb302abc563a2060493f2f0304ae902;hp=d7d1f437945c47cfdbade90abcd4df40d434cfbe;hpb=b3f188843330c56bd4d17a3c930e73f573b1c71f;p=sbcl.git diff --git a/src/code/seq.lisp b/src/code/seq.lisp index d7d1f43..b05450e 100644 --- a/src/code/seq.lisp +++ b/src/code/seq.lisp @@ -275,8 +275,9 @@ (cons (cond ((eq (car type) 'string) `(vector character ,@(cdr type))) ((eq (car type) 'simple-string) - `(simple-array character ,@(when (cdr type) - (list (cdr type))))) + `(simple-array character ,(if (cdr type) + (cdr type) + '(*)))) (t type))) (t type))) (type (specifier-type adjusted-type))) @@ -568,6 +569,15 @@ (when (null source-end) (setq source-end (length source-sequence))) (mumble-replace-from-mumble)) +#!+sb-unicode +(defun simple-character-string-replace-from-simple-character-string* + (target-sequence source-sequence + target-start target-end source-start source-end) + (declare (type (simple-array character (*)) target-sequence source-sequence)) + (when (null target-end) (setq target-end (length target-sequence))) + (when (null source-end) (setq source-end (length source-sequence))) + (mumble-replace-from-mumble)) + (define-sequence-traverser replace (sequence1 sequence2 &key start1 end1 start2 end2) #!+sb-doc @@ -1548,7 +1558,7 @@ (declare (fixnum index)) (setq splice (cdr (rplacd splice (list (car current))))) (setq current (cdr current))) - (do ((index 0 (1+ index))) + (do ((index start (1+ index))) ((or (and end (= index (the fixnum end))) (atom current))) (declare (fixnum index)) @@ -2006,7 +2016,7 @@ (simple-base-string (frob2)) (t (vector*-frob sequence)))) (declare (type (or index null) p)) - (values f (and p (the index (+ p offset)))))))))) + (values f (and p (the index (- p offset)))))))))) (defun %find-position (item sequence-arg from-end start end key test) (macrolet ((frob (sequence from-end) `(%find-position item ,sequence