mirror of
git://git.code.sf.net/p/sbcl/sbcl
synced 2026-09-10 07:26:40 -04:00
Don't produce a compile time warning for (setf (char string 0) #\é)
This commit is contained in:
parent
93c205db17
commit
adcd474725
|
|
@ -268,7 +268,7 @@
|
|||
(let ((data (truly-the (simple-array ,element-type-specifier 1) data)))
|
||||
,(if stringp
|
||||
`(if (simple-base-string-p data)
|
||||
(data-vector-set (truly-the (simple-array base-char (*)) data) index (the base-char ,new-value))
|
||||
(data-vector-set (truly-the (simple-array base-char (*)) data) index (the* (base-char :silent-conflict t) ,new-value))
|
||||
(data-vector-set (truly-the (simple-array character (*)) data) index (the character ,new-value)))
|
||||
`(data-vector-set data index ,new-value))
|
||||
,truly-new-value))))))
|
||||
|
|
|
|||
|
|
@ -1166,3 +1166,9 @@
|
|||
(lambda (x n)
|
||||
(aref (if n (the string n) #(1 2)) x))
|
||||
(or (integer 1 2) character)))
|
||||
|
||||
#+sb-unicode
|
||||
(with-test (:name :char-base-char-warning)
|
||||
(checked-compile
|
||||
`(lambda (s)
|
||||
(setf (char s 0) (code-char 233)))))
|
||||
|
|
|
|||
|
|
@ -334,6 +334,7 @@
|
|||
(error "~s" vector))))))
|
||||
(free-protected-array string))))
|
||||
|
||||
#+(or arm64 x86-64)
|
||||
(with-test (:name :character-string-to-utf8)
|
||||
(flet ((run-test (string obuf vector)
|
||||
(loop repeat (* 256 #+slow 10)
|
||||
|
|
|
|||
Loading…
Reference in a new issue