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