[movitz-cvs] CVS update: movitz/losp/muerte/arrays.lisp
Frode Vatvedt Fjeld
ffjeld at common-lisp.net
Sun Mar 28 16:20:44 UTC 2004
Update of /project/movitz/cvsroot/movitz/losp/muerte
In directory common-lisp.net:/tmp/cvs-serv12544
Modified Files:
arrays.lisp
Log Message:
Set initial-contents when make-array a string.
Date: Sun Mar 28 11:20:44 2004
Author: ffjeld
Index: movitz/losp/muerte/arrays.lisp
diff -u movitz/losp/muerte/arrays.lisp:1.11 movitz/losp/muerte/arrays.lisp:1.12
--- movitz/losp/muerte/arrays.lisp:1.11 Fri Mar 26 08:56:53 2004
+++ movitz/losp/muerte/arrays.lisp Sun Mar 28 11:20:44 2004
@@ -10,7 +10,7 @@
;;;; Author: Frode Vatvedt Fjeld <frodef at acm.org>
;;;; Created at: Sun Feb 11 23:14:04 2001
;;;;
-;;;; $Id: arrays.lisp,v 1.11 2004/03/26 13:56:53 ffjeld Exp $
+;;;; $Id: arrays.lisp,v 1.12 2004/03/28 16:20:44 ffjeld Exp $
;;;;
;;;;------------------------------------------------------------------
@@ -516,9 +516,14 @@
0 :unsigned-byte16)
dimensions)
(setf (fill-pointer a) fill-pointer)
- (when initial-element
+ (cond
+ (initial-element
+ (check-type initial-element character)
(dotimes (i dimensions)
(setf (char%unsafe a i) initial-element)))
+ (initial-contents
+ (dotimes (i dimensions)
+ (setf (char a i) (elt initial-contents i)))))
a))
((member element-type '(u8 (unsigned-byte 8)) :test #'equal)
(let ((a (inline-malloc (+ #.(bt:sizeof 'movitz::movitz-vector) dimensions)
More information about the Movitz-cvs
mailing list