Changeset 4361


Ignore:
Timestamp:
10/14/03 02:31:20 (20 years ago)
Author:
piso
Message:

SUBTYPEP-NORMALIZE-TYPE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/subtypep.lisp

    r4289 r4361  
    22;;;
    33;;; Copyright (C) 2003 Peter Graves
    4 ;;; $Id: subtypep.lisp,v 1.20 2003-10-10 17:13:33 piso Exp $
     4;;; $Id: subtypep.lisp,v 1.21 2003-10-14 02:31:20 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    128128    (case tp
    129129      ((ARRAY SIMPLE-ARRAY)
    130        (when (and i (eq (car i) nil))
     130       (when (and i (eq (car i) nil)) ; Element type is NIL.
    131131         (if (eq tp 'simple-array)
    132132             (setq tp 'simple-string)
    133133             (setq tp 'string))
    134          (when (cadr i)
    135            (if (consp (cadr i))
    136                (setq i (cadr i))
    137                (setq i (list (cadr i)))))))
     134         (when (cadr i) ; rank/dimensions
     135           (cond ((and (consp (cadr i)) (= (length (cadr i)) 1))
     136                  (if (eq (caadr i) '*)
     137                      (setq i nil)
     138                      (setq i (cadr i))))
     139                 ((eql (cadr i) 1)
     140                  (setq i nil))
     141                 (t
     142                  (error "invalid type specifier ~S" type))))))
    138143      ((SHORT-FLOAT SINGLE-FLOAT DOUBLE-FLOAT LONG-FLOAT)
    139144       (setq tp 'float)))
Note: See TracChangeset for help on using the changeset viewer.