mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-22 16:47:28 +01:00
Change the order of check_wuffs_version args
This puts the self_ptr, self_len args next to each other.
This commit is contained in:
1 parent
1211e16e3c
commit
5b08ad2ba6
24 files changed
+184
-173
No files matched your search
+9
-9
@@ -1307,10 +1307,10 @@ typedef struct {
|
||||
//
|
||||
// It should be called before any other wuffs_deflate__decoder__* function.
|
||||
//
|
||||
// Pass WUFFS_VERSION and sizeof(*self) for wuffs_version and sizeof_star_self.
|
||||
// Pass sizeof(*self) and WUFFS_VERSION for sizeof_star_self and wuffs_version.
|
||||
void wuffs_deflate__decoder__check_wuffs_version(wuffs_deflate__decoder* self,
|
||||
uint32_t wuffs_version,
|
||||
size_t sizeof_star_self);
|
||||
size_t sizeof_star_self,
|
||||
uint32_t wuffs_version);
|
||||
|
||||
// ---------------- Public Function Prototypes
|
||||
|
||||
@@ -1979,19 +1979,19 @@ static wuffs_deflate__status wuffs_deflate__decoder__decode_huffman_slow(
|
||||
// ---------------- Initializer Implementations
|
||||
|
||||
void wuffs_deflate__decoder__check_wuffs_version(wuffs_deflate__decoder* self,
|
||||
uint32_t wuffs_version,
|
||||
size_t sizeof_star_self) {
|
||||
size_t sizeof_star_self,
|
||||
uint32_t wuffs_version) {
|
||||
if (!self) {
|
||||
return;
|
||||
}
|
||||
if (wuffs_version != WUFFS_VERSION) {
|
||||
self->private_impl.status = WUFFS_DEFLATE__ERROR_BAD_WUFFS_VERSION;
|
||||
return;
|
||||
}
|
||||
if (sizeof(*self) != sizeof_star_self) {
|
||||
self->private_impl.status = WUFFS_DEFLATE__ERROR_BAD_SIZEOF_RECEIVER;
|
||||
return;
|
||||
}
|
||||
if (wuffs_version != WUFFS_VERSION) {
|
||||
self->private_impl.status = WUFFS_DEFLATE__ERROR_BAD_WUFFS_VERSION;
|
||||
return;
|
||||
}
|
||||
if (self->private_impl.magic != 0) {
|
||||
self->private_impl.status =
|
||||
WUFFS_DEFLATE__ERROR_CHECK_WUFFS_VERSION_CALLED_TWICE;
|
||||
|
||||
Reference in new issue
Block a user