From: David Vázquez Date: Fri, 24 May 2013 01:46:45 +0000 (+0100) Subject: Special case in make-array for strings X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=6475d2c606e3295d58ce44c069271fd617d9d00f;p=jscl.git Special case in make-array for strings --- diff --git a/src/array.lisp b/src/array.lisp index e3e1f2e..44ad0cf 100644 --- a/src/array.lisp +++ b/src/array.lisp @@ -25,8 +25,10 @@ (array (make-storage-vector size))) ;; Upgrade type (if (eq element-type 'character) - (setf element-type 'character - initial-element (or initial-element #\space)) + (progn + (oset array "stringp" 1) + (setf element-type 'character + initial-element (or initial-element #\space))) (setf element-type t)) ;; Initialize array (dotimes (i size) diff --git a/src/string.lisp b/src/string.lisp index 8c29abf..8fe6368 100644 --- a/src/string.lisp +++ b/src/string.lisp @@ -13,9 +13,6 @@ ;; You should have received a copy of the GNU General Public License ;; along with JSCL. If not, see . -;; (defun stringp (x) -;; (and (vectorp x) (eq (array-element-type x) 'character))) - (defun stringp (s) (stringp s))