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