Ignore:
Timestamp:
03/25/18 21:06:15 (2 years ago)
Author:
Kon Lovett
Message:

add types to -chunk, bix -bv use before -check, rmv fx-utils dep (in mathh), add typed-define dep (in dsssl-utils), rmv dup type

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/message-digest/trunk/message-digest-type.scm

    r35341 r35342  
    4545
    4646(include "message-digest-types")
     47
     48;;
     49
     50(define (%u8vector-blob u8vec)
     51  (##sys#slot u8vec 1) )
    4752
    4853;;
     
    178183      (check-result-type 'finalize-message-digest mdp result-buffer)) )
    179184    ;side-effects res
    180     (let ((buf (if (u8vector? res) (##sys#slot res 1) res)))
     185    (let (
     186      (buf (if (u8vector? res) (%u8vector-blob res) res)) )
    181187      ((message-digest-primitive-final mdp) (message-digest-context md) buf) )
    182188    res ) )
     
    184190;;
    185191
    186 (define: (setup-message-digest-buffer! (md message-digest) (sz fixnum)) -> message-digest-buffer
     192(define: (setup-message-digest-buffer! (md message-digest) (siz fixnum)) -> message-digest-buffer
    187193  (let (
    188194    (buf (message-digest-buffer md))
    189     (sz (fxmax sz MINIMUM-BUFFER-SIZE)) )
     195    (siz (fxmax siz MINIMUM-BUFFER-SIZE)) )
    190196    ;enough space? then reuse, otherwise new buffer
    191     (if (and buf (fx<= sz (number-of-bytes buf)))
     197    (if (and buf (fx<= siz (number-of-bytes buf)))
    192198      buf
    193       (new-message-digest-buffer! md sz) ) ) )
    194 
    195 (define: (new-message-digest-buffer! (md message-digest) (sz fixnum)) -> message-digest-buffer
    196   (let (
    197     (buf (make-blob sz)) )
     199      (new-message-digest-buffer! md siz) ) ) )
     200
     201(define: (new-message-digest-buffer! (md message-digest) (siz fixnum)) -> message-digest-buffer
     202  (let (
     203    (buf (make-blob siz)) )
    198204    (message-digest-buffer-set! md buf)
    199205    buf ) )
Note: See TracChangeset for help on using the changeset viewer.