mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-23 13:01:42 -08:00
expand-vector-push: simplify error condition
assert, that function takes 2 up to 3 (if extended) arguments.
This commit is contained in:
parent
bf310ef23a
commit
ee059366db
1 changed files with 7 additions and 7 deletions
|
|
@ -97,13 +97,13 @@
|
|||
(not (policy-open-code-aref/aset)))
|
||||
(return-from expand-vector-push
|
||||
whole))
|
||||
(let ((len (length args)))
|
||||
(when (or (< len 2)
|
||||
(> len (if extend 3 2)))
|
||||
(cmpwarn "Wrong number of arguments passed to function ~A in form: ~A" (first whole) whole)
|
||||
(return-from expand-vector-push
|
||||
`(si::simple-program-error
|
||||
"Wrong number of arguments passed to function ~A in form: ~A" ',(first whole) ',whole))))
|
||||
(unless (<= 2
|
||||
(length args)
|
||||
(if extend 3 2))
|
||||
(cmpwarn "Wrong number of arguments passed to function ~A in form: ~A" (first whole) whole)
|
||||
(return-from expand-vector-push
|
||||
`(si::simple-program-error
|
||||
"Wrong number of arguments passed to function ~A in form: ~A" ',(first whole) ',whole)))
|
||||
`(let* ((value ,(car args))
|
||||
(vector ,(second args)))
|
||||
(declare (:read-only value vector)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue