Basic constructor macro for ushort-array structures.
(make-ushort-array [:elemtype <elemtype>] [:elements <elements>])
This is the usual way to construct ushort-array structures. It simply conses together a structure with the specified fields.
This macro generates a new ushort-array structure from scratch. See also change-ushort-array, which can "change" an existing structure, instead.
This is an ordinary
Macro:
(defmacro make-ushort-array (&rest args) (std::make-aggregate 'ushort-array args '((:elemtype) (:elements)) 'make-ushort-array nil))
Function:
(defun ushort-array (elemtype elements) (declare (xargs :guard (and (typep elemtype) (ushort-listp elements)))) (declare (xargs :guard (and (type-case elemtype :ushort) (consp elements)))) (let ((__function__ 'ushort-array)) (declare (ignorable __function__)) (b* ((elemtype (mbe :logic (type-fix elemtype) :exec elemtype)) (elements (mbe :logic (ushort-list-fix elements) :exec elements))) (let ((elemtype (mbe :logic (if (type-case elemtype :ushort) elemtype (type-ushort)) :exec elemtype)) (elements (mbe :logic (if (consp elements) elements (list (ushort-from-integer 0))) :exec elements))) (cons :array (list elemtype elements))))))