Have crc32's ieee.update return u32

This commit is contained in:
Nigel Tao committed 2018-03-25 17:04:14 +11:00
1 parent 917737ec97
commit 008bce65f2
5 files changed
+40 -16

No files matched your search

+7 -1
View File
@@ -16,9 +16,15 @@ packageid "crc3"
// TODO: drop the '?' but still generate wuffs_crc32__ieee__initialize?
pub struct ieee?(
state u32,
)
// TODO: add a ! as this function is impure.
pub func ieee.update(x[] u8)() {
//
// 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[] u8)(checksum u32) {
// TODO: implement.
return this.state
}