Rename crc32.ieee to crc32.ieee_hasher

This commit is contained in:
Nigel Tao committed 2018-04-27 20:23:45 +10:00
1 parent 035b138cb1
commit eecdaba4e8
8 files changed
+68 -67

No files matched your search

+3 -3
View File
@@ -14,8 +14,8 @@
packageid "crc3"
// TODO: drop the '?' but still generate wuffs_crc32__ieee__initialize?
pub struct ieee?(
// TODO: drop the '?' but still generate wuffs_crc32__ieee_hasher__initialize?
pub struct ieee_hasher?(
state base.u32,
)
@@ -24,7 +24,7 @@ pub struct ieee?(
// TODO: should it be ? instead of ! because it's public, and might need a way
// to signal "initializer not called"? Should the return type, in the generated
// C code, be "struct{ uint32_t checksum; wuffs_crc32__status status }"?
pub func ieee.update(x slice base.u8)(checksum base.u32) {
pub func ieee_hasher.update(x slice base.u8)(checksum base.u32) {
var s base.u32 = 0xFFFFFFFF ^ this.state
iterate[1](p ptr base.u8:in.x) {
+1 -1
View File
@@ -24,7 +24,7 @@ pub error "invalid gzip encoding flags"
pub struct decoder?(
flate deflate.decoder,
checksum crc32.ieee,
checksum crc32.ieee_hasher,
ignore_checksum base.bool,
)