Have check_wuffs_version take the sizeof receiver

Also rename foo__initialize to foo__check_wuffs_version.
This commit is contained in:
Nigel Tao committed 2018-05-29 14:20:27 +10:00
1 parent d59eec7936
commit 87ab36f8c4
28 files changed
+354 -361

No files matched your search

+16 -15
View File
@@ -1218,14 +1218,15 @@ typedef struct {
// ---------------- Public Initializer Prototypes
// wuffs_crc32__ieee_hasher__initialize is an initializer function.
// wuffs_crc32__ieee_hasher__check_wuffs_version is an initializer 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_hasher__initialize(wuffs_crc32__ieee_hasher* self,
uint32_t wuffs_version,
uint32_t for_internal_use_only);
// Pass WUFFS_VERSION and sizeof(*self) for wuffs_version and sizeof_star_self.
void wuffs_crc32__ieee_hasher__check_wuffs_version(
wuffs_crc32__ieee_hasher* self,
uint32_t wuffs_version,
size_t sizeof_star_self);
// ---------------- Public Function Prototypes
@@ -1398,14 +1399,14 @@ typedef struct {
// ---------------- Public Initializer Prototypes
// wuffs_deflate__decoder__initialize is an initializer function.
// wuffs_deflate__decoder__check_wuffs_version is an initializer function.
//
// It should be called before any other wuffs_deflate__decoder__* function.
//
// Pass WUFFS_VERSION and 0 for wuffs_version and for_internal_use_only.
void wuffs_deflate__decoder__initialize(wuffs_deflate__decoder* self,
uint32_t wuffs_version,
uint32_t for_internal_use_only);
// Pass WUFFS_VERSION and sizeof(*self) for wuffs_version and sizeof_star_self.
void wuffs_deflate__decoder__check_wuffs_version(wuffs_deflate__decoder* self,
uint32_t wuffs_version,
size_t sizeof_star_self);
// ---------------- Public Function Prototypes
@@ -1500,14 +1501,14 @@ typedef struct {
// ---------------- Public Initializer Prototypes
// wuffs_gzip__decoder__initialize is an initializer function.
// wuffs_gzip__decoder__check_wuffs_version is an initializer function.
//
// It should be called before any other wuffs_gzip__decoder__* function.
//
// Pass WUFFS_VERSION and 0 for wuffs_version and for_internal_use_only.
void wuffs_gzip__decoder__initialize(wuffs_gzip__decoder* self,
uint32_t wuffs_version,
uint32_t for_internal_use_only);
// Pass WUFFS_VERSION and sizeof(*self) for wuffs_version and sizeof_star_self.
void wuffs_gzip__decoder__check_wuffs_version(wuffs_gzip__decoder* self,
uint32_t wuffs_version,
size_t sizeof_star_self);
// ---------------- Public Function Prototypes