Change iterate variable types from ptr to slice

This commit is contained in:
Nigel Tao committed 2018-05-04 13:20:34 +10:00
1 parent d85a94360e
commit 96a549814d
8 files changed
+54 -52

No files matched your search

+1 -1
View File
@@ -27,7 +27,7 @@ pub struct ieee_hasher?(
pub func ieee_hasher.update(x slice base.u8)(checksum base.u32) {
var s base.u32 = 0xFFFFFFFF ^ this.state
iterate (step:8, unroll:1)(p ptr base.u8:in.x) {
iterate (step:8, unroll:1)(p slice base.u8:in.x) {
// TODO: explain the slicing-by-8 algorithm.
//
// TODO: bounds checking for the index expressions "p[7]" etc.