summaryrefslogtreecommitdiff
path: root/src/common.lisp
diff options
context:
space:
mode:
authorPiotr Szarmanski2022-09-21 22:50:14 +0200
committerPiotr Szarmanski2022-09-21 22:50:14 +0200
commit56d3ca4cf14ac1b2bac9c866daa98cdb803915fa (patch)
treef97d64c7ba5903491db5ae48612507a4ae216859 /src/common.lisp
Initial commit.
Diffstat (limited to 'src/common.lisp')
-rw-r--r--src/common.lisp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/common.lisp b/src/common.lisp
new file mode 100644
index 0000000..3f078ff
--- /dev/null
+++ b/src/common.lisp
@@ -0,0 +1,10 @@
+(in-package :eris)
+
+(defun subseq-shared (array start)
+ (make-array (- (length array) start)
+ :element-type (array-element-type array)
+ :displaced-to array
+ :displaced-index-offset start))
+
+(defmacro make-octets (len &key (element 0))
+ `(make-array ,len :element-type '(unsigned-byte 8) :initial-element ,element))