fix upgraded-array-element-type tests - gcl.git - GNU Common Lisp

index : gcl.git
GNU Common Lisp
summary refs log tree commit diff
diff options
context:
space:
mode:
authorCamm Maguire <camm@debian.org>2013年11月06日 20:54:03 +0000
committerCamm Maguire <camm@debian.org>2013年11月06日 20:54:03 +0000
commitc1c6243066d49db47a28eda3b125443db38d3f27 (patch)
tree9c147696b889d3d0efd7badabcb285bf930b088a
parent2819fbaab7e047c19d022ffda19e00135d772604 (diff)
downloadgcl-c1c6243066d49db47a28eda3b125443db38d3f27.tar.gz
fix upgraded-array-element-type tests
Diffstat
-rwxr-xr-xgcl/lsp/gcl_arraylib.lsp 2
-rwxr-xr-xgcl/lsp/gcl_predlib.lsp 9
2 files changed, 5 insertions, 6 deletions
diff --git a/gcl/lsp/gcl_arraylib.lsp b/gcl/lsp/gcl_arraylib.lsp
index e223bc4e9..595969f90 100755
--- a/gcl/lsp/gcl_arraylib.lsp
+++ b/gcl/lsp/gcl_arraylib.lsp
@@ -269,7 +269,7 @@
; (fill-pointer-internal x)
(defun make-array (dimensions
- &key element-type
+ &key (element-type t)
initial-element
(initial-contents nil icsp)
adjustable fill-pointer
diff --git a/gcl/lsp/gcl_predlib.lsp b/gcl/lsp/gcl_predlib.lsp
index f17fcab9b..298053d6a 100755
--- a/gcl/lsp/gcl_predlib.lsp
+++ b/gcl/lsp/gcl_predlib.lsp
@@ -1191,16 +1191,15 @@
;; ARRAY TYPES
+(defconstant +array-types-but-t+ (lremove t +array-types+))
+
(defun expand-array-element-type (type)
- (cond
- ((car (member type +array-types+ :test 'subtypep1)))
- ((subtypep1 type 'float) 'long-float)
- (t)))
+ (or (car (member type +array-types-but-t+ :test 'subtypep)) t))
#.`(defun upgraded-array-element-type (type &optional environment)
(declare (ignore environment) (optimize (safety 1)))
(case type
- ((nil t) t)
+ ((nil t) type)
,@(mapcar (lambda (x) `(,x type)) (cons '* (lremove t +array-types+)))
(otherwise (expand-array-element-type type))))
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月02日 22:30:14 +0000

AltStyle によって変換されたページ (->オリジナル) /