[movitz-cvs] CVS update: movitz/losp/muerte/arrays.lisp

Frode Vatvedt Fjeld ffjeld at common-lisp.net
Thu Nov 25 02:10:40 UTC 2004


Update of /project/movitz/cvsroot/movitz/losp/muerte
In directory common-lisp.net:/tmp/cvs-serv27958

Modified Files:
	arrays.lisp 
Log Message:
Make (Setf char) and (setf schar) more safe.

Date: Thu Nov 25 03:10:39 2004
Author: ffjeld

Index: movitz/losp/muerte/arrays.lisp
diff -u movitz/losp/muerte/arrays.lisp:1.48 movitz/losp/muerte/arrays.lisp:1.49
--- movitz/losp/muerte/arrays.lisp:1.48	Tue Nov 23 20:30:23 2004
+++ movitz/losp/muerte/arrays.lisp	Thu Nov 25 03:10:38 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.48 2004/11/23 19:30:23 ffjeld Exp $
+;;;; $Id: arrays.lisp,v 1.49 2004/11/25 02:10:38 ffjeld Exp $
 ;;;;                
 ;;;;------------------------------------------------------------------
 
@@ -518,6 +518,8 @@
 	  :index index :type :character))
 
 (defun (setf char) (value string index)
+  (check-type string string)
+  (check-type value character)
   (assert (below index (array-dimension string 0)))
   (setf (memref string (movitz-type-slot-offset 'movitz-basic-vector 'data)
 		:index index :type :character) value))
@@ -531,6 +533,7 @@
 
 (defun (setf schar) (value string index)
   (check-type string string)
+  (check-type value character)
   (assert (below index (length string)))
   (setf (memref string (movitz-type-slot-offset 'movitz-basic-vector 'data)
 		:index index :type :character)





More information about the Movitz-cvs mailing list