summaryrefslogtreecommitdiff
path: root/src/eris-decode.lisp
diff options
context:
space:
mode:
authorPiotr Szarmanski2022-11-20 21:47:23 +0100
committerPiotr Szarmanski2022-11-20 21:47:23 +0100
commit618ee634557122b3b3c5012405603b28c0001d13 (patch)
treedf84a7dab310a90ca24ff63267ceb123fcdd2428 /src/eris-decode.lisp
parent4dc0b96bd101f34092a3ff5cd5864fc8fe7830c1 (diff)
Fix some compilation warnings
Diffstat (limited to 'src/eris-decode.lisp')
-rw-r--r--src/eris-decode.lisp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/eris-decode.lisp b/src/eris-decode.lisp
index 806bd37..b3629a2 100644
--- a/src/eris-decode.lisp
+++ b/src/eris-decode.lisp
@@ -111,7 +111,8 @@ represents."
This function walks the tree in order to get the next block, which is then put
in the buffer object of the STREAM. It sets the EOF indicator of the buffer if
it is necessary and sets the position in the buffer to 0."
- (declare (optimize (speed 3) (debug 0)))
+ (declare (optimize (speed 3) (debug 0))
+ (type eris-decode-stream stream))
(with-slots (buffer position eof block-size root get-block nonce-array) stream
(declare (type integer position eof)
(type block-size block-size)
@@ -140,7 +141,7 @@ it is necessary and sets the position in the buffer to 0."
(defun read-to-seq (sequence buf &key (start 0) (end (length sequence)) stream)
(declare (optimize (speed 3) (debug 0))
- (type integer end start sum)
+ (type array-total-size end start)
#+sbcl (sb-ext:muffle-conditions sb-ext:compiler-note))
(with-slots (data pos eof) buf
(declare (type (integer 0 32768) pos eof)
@@ -218,7 +219,11 @@ hash-table is used, a (copy-seq) needs to be done on the return value of
gethash.
The keyword argument CACHE-CAPACITY indicates the amount of blocks stored in the
-cache. It may be NIL to turn off caching entirely."
+cache. It may be NIL to turn off caching entirely.
+
+The conditions ERIS:MISSING-BLOCK, ERIS:PADDING, ERIS:HASH-MISMATCH and ERIS:EOF
+may be signaled by operations on the stream. Any condition signaled from within
+FETCH-FUNCTION is not handled."
(declare (type read-capability read-capability)
(type function fetch-function)
(type (or integer null) cache-capacity))