From 6475d2c606e3295d58ce44c069271fd617d9d00f Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20V=C3=A1zquez?= Date: Fri, 24 May 2013 02:46:45 +0100 Subject: [PATCH] Special case in make-array for strings --- src/array.lisp | 6 ++++-- src/string.lisp | 3 --- 2 files changed, 4 insertions(+), 5 deletions(-) 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)) -- 1.7.10.4