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

+14 -13
View File
@@ -1075,7 +1075,7 @@ const char* wuffs_crc32__status__string(wuffs_crc32__status s);
typedef struct {
// Do not access the private_impl's fields directly. There is no API/ABI
// compatibility or safety guarantee if you do so. Instead, use the
// wuffs_crc32__ieee__etc functions.
// wuffs_crc32__ieee_hasher__etc functions.
//
// In C++, these fields would be "private", but C does not support that.
//
@@ -1087,23 +1087,23 @@ typedef struct {
uint32_t f_state;
} private_impl;
} wuffs_crc32__ieee;
} wuffs_crc32__ieee_hasher;
// ---------------- Public Initializer Prototypes
// wuffs_crc32__ieee__initialize is an initializer function.
// wuffs_crc32__ieee_hasher__initialize is an initializer function.
//
// It should be called before any other wuffs_crc32__ieee__* function.
// It should be called before any other wuffs_crc32__ieee_hasher__* function.
//
// Pass WUFFS_VERSION and 0 for wuffs_version and for_internal_use_only.
void wuffs_crc32__ieee__initialize(wuffs_crc32__ieee* self,
uint32_t wuffs_version,
uint32_t for_internal_use_only);
void wuffs_crc32__ieee_hasher__initialize(wuffs_crc32__ieee_hasher* self,
uint32_t wuffs_version,
uint32_t for_internal_use_only);
// ---------------- Public Function Prototypes
uint32_t wuffs_crc32__ieee__update(wuffs_crc32__ieee* self,
wuffs_base__slice_u8 a_x);
uint32_t wuffs_crc32__ieee_hasher__update(wuffs_crc32__ieee_hasher* self,
wuffs_base__slice_u8 a_x);
#ifdef __cplusplus
} // extern "C"
@@ -1354,7 +1354,7 @@ typedef struct {
uint32_t magic;
wuffs_deflate__decoder f_flate;
wuffs_crc32__ieee f_checksum;
wuffs_crc32__ieee_hasher f_checksum;
bool f_ignore_checksum;
struct {
@@ -1841,8 +1841,9 @@ void wuffs_gzip__decoder__initialize(wuffs_gzip__decoder* self,
self->private_impl.magic = WUFFS_BASE__MAGIC;
wuffs_deflate__decoder__initialize(&self->private_impl.f_flate, WUFFS_VERSION,
WUFFS_BASE__ALREADY_ZEROED);
wuffs_crc32__ieee__initialize(&self->private_impl.f_checksum, WUFFS_VERSION,
WUFFS_BASE__ALREADY_ZEROED);
wuffs_crc32__ieee_hasher__initialize(&self->private_impl.f_checksum,
WUFFS_VERSION,
WUFFS_BASE__ALREADY_ZEROED);
}
// ---------------- Function Implementations
@@ -2103,7 +2104,7 @@ wuffs_gzip__status wuffs_gzip__decoder__decode(wuffs_gzip__decoder* self,
v_z = t_8;
}
if (!self->private_impl.f_ignore_checksum) {
v_checksum_got = wuffs_crc32__ieee__update(
v_checksum_got = wuffs_crc32__ieee_hasher__update(
&self->private_impl.f_checksum,
((wuffs_base__slice_u8){
.ptr = a_dst.private_impl.mark,