mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-25 08:55:11 +01:00
Have WUFFS_VERSION encode major.minor.patch
This commit is contained in:
1 parent
2d838db184
commit
27e0139500
18 files changed
+277
-163
No files matched your search
+19
-11
@@ -31,16 +31,23 @@
|
||||
#error "Wuffs requires a word size of either 32 or 64 bits"
|
||||
#endif
|
||||
|
||||
// WUFFS_VERSION is the major.minor version number as a uint32_t. The major
|
||||
// number is the high 16 bits. The minor number is the low 16 bits.
|
||||
// WUFFS_VERSION is the major.minor.patch version, as per https://semver.org/,
|
||||
// as a uint64_t. The major number is the high 32 bits. The minor number is the
|
||||
// middle 16 bits. The patch number is the low 16 bits. The version extension
|
||||
// (such as "", "beta" or "rc.1") is part of the string representation (such as
|
||||
// "1.2.3-beta") but not the uint64_t representation.
|
||||
//
|
||||
// The intention is to bump the version number at least on every API / ABI
|
||||
// backwards incompatible change.
|
||||
// All three of major, minor and patch being zero means that this is a
|
||||
// work-in-progress version, not a release version, and has no backwards or
|
||||
// forwards compatibility guarantees.
|
||||
//
|
||||
// For now, the API and ABI are simply unstable and can change at any time.
|
||||
//
|
||||
// TODO: don't hard code this in base-header.h.
|
||||
#define WUFFS_VERSION ((uint32_t)0x00001)
|
||||
// !! Some code generation programs can override WUFFS_VERSION.
|
||||
#define WUFFS_VERSION ((uint64_t)0)
|
||||
#define WUFFS_VERSION_MAJOR ((uint64_t)0)
|
||||
#define WUFFS_VERSION_MINOR ((uint64_t)0)
|
||||
#define WUFFS_VERSION_PATCH ((uint64_t)0)
|
||||
#define WUFFS_VERSION_EXTENSION ""
|
||||
#define WUFFS_VERSION_STRING "0.0.0"
|
||||
|
||||
// wuffs_base__empty_struct is used when a Wuffs function returns an empty
|
||||
// struct. In C, if a function f returns void, you can't say "x = f()", but in
|
||||
@@ -1275,7 +1282,7 @@ typedef struct {
|
||||
// Pass sizeof(*self) and WUFFS_VERSION for sizeof_star_self and wuffs_version.
|
||||
void wuffs_adler32__hasher__check_wuffs_version(wuffs_adler32__hasher* self,
|
||||
size_t sizeof_star_self,
|
||||
uint32_t wuffs_version);
|
||||
uint64_t wuffs_version);
|
||||
|
||||
// ---------------- Public Function Prototypes
|
||||
|
||||
@@ -1902,7 +1909,7 @@ const char* wuffs_adler32__status__string(wuffs_adler32__status s) {
|
||||
|
||||
void wuffs_adler32__hasher__check_wuffs_version(wuffs_adler32__hasher* self,
|
||||
size_t sizeof_star_self,
|
||||
uint32_t wuffs_version) {
|
||||
uint64_t wuffs_version) {
|
||||
if (!self) {
|
||||
return;
|
||||
}
|
||||
@@ -1910,7 +1917,8 @@ void wuffs_adler32__hasher__check_wuffs_version(wuffs_adler32__hasher* self,
|
||||
self->private_impl.status = WUFFS_ADLER32__ERROR_BAD_SIZEOF_RECEIVER;
|
||||
return;
|
||||
}
|
||||
if (wuffs_version != WUFFS_VERSION) {
|
||||
if (((wuffs_version >> 32) != WUFFS_VERSION_MAJOR) ||
|
||||
(((wuffs_version >> 16) & 0xFFFF) > WUFFS_VERSION_MINOR)) {
|
||||
self->private_impl.status = WUFFS_ADLER32__ERROR_BAD_WUFFS_VERSION;
|
||||
return;
|
||||
}
|
||||
|
||||
+19
-11
@@ -31,16 +31,23 @@
|
||||
#error "Wuffs requires a word size of either 32 or 64 bits"
|
||||
#endif
|
||||
|
||||
// WUFFS_VERSION is the major.minor version number as a uint32_t. The major
|
||||
// number is the high 16 bits. The minor number is the low 16 bits.
|
||||
// WUFFS_VERSION is the major.minor.patch version, as per https://semver.org/,
|
||||
// as a uint64_t. The major number is the high 32 bits. The minor number is the
|
||||
// middle 16 bits. The patch number is the low 16 bits. The version extension
|
||||
// (such as "", "beta" or "rc.1") is part of the string representation (such as
|
||||
// "1.2.3-beta") but not the uint64_t representation.
|
||||
//
|
||||
// The intention is to bump the version number at least on every API / ABI
|
||||
// backwards incompatible change.
|
||||
// All three of major, minor and patch being zero means that this is a
|
||||
// work-in-progress version, not a release version, and has no backwards or
|
||||
// forwards compatibility guarantees.
|
||||
//
|
||||
// For now, the API and ABI are simply unstable and can change at any time.
|
||||
//
|
||||
// TODO: don't hard code this in base-header.h.
|
||||
#define WUFFS_VERSION ((uint32_t)0x00001)
|
||||
// !! Some code generation programs can override WUFFS_VERSION.
|
||||
#define WUFFS_VERSION ((uint64_t)0)
|
||||
#define WUFFS_VERSION_MAJOR ((uint64_t)0)
|
||||
#define WUFFS_VERSION_MINOR ((uint64_t)0)
|
||||
#define WUFFS_VERSION_PATCH ((uint64_t)0)
|
||||
#define WUFFS_VERSION_EXTENSION ""
|
||||
#define WUFFS_VERSION_STRING "0.0.0"
|
||||
|
||||
// wuffs_base__empty_struct is used when a Wuffs function returns an empty
|
||||
// struct. In C, if a function f returns void, you can't say "x = f()", but in
|
||||
@@ -1274,7 +1281,7 @@ typedef struct {
|
||||
void wuffs_crc32__ieee_hasher__check_wuffs_version(
|
||||
wuffs_crc32__ieee_hasher* self,
|
||||
size_t sizeof_star_self,
|
||||
uint32_t wuffs_version);
|
||||
uint64_t wuffs_version);
|
||||
|
||||
// ---------------- Public Function Prototypes
|
||||
|
||||
@@ -2265,7 +2272,7 @@ static const uint32_t wuffs_crc32__ieee_table[8][256] = {
|
||||
void wuffs_crc32__ieee_hasher__check_wuffs_version(
|
||||
wuffs_crc32__ieee_hasher* self,
|
||||
size_t sizeof_star_self,
|
||||
uint32_t wuffs_version) {
|
||||
uint64_t wuffs_version) {
|
||||
if (!self) {
|
||||
return;
|
||||
}
|
||||
@@ -2273,7 +2280,8 @@ void wuffs_crc32__ieee_hasher__check_wuffs_version(
|
||||
self->private_impl.status = WUFFS_CRC32__ERROR_BAD_SIZEOF_RECEIVER;
|
||||
return;
|
||||
}
|
||||
if (wuffs_version != WUFFS_VERSION) {
|
||||
if (((wuffs_version >> 32) != WUFFS_VERSION_MAJOR) ||
|
||||
(((wuffs_version >> 16) & 0xFFFF) > WUFFS_VERSION_MINOR)) {
|
||||
self->private_impl.status = WUFFS_CRC32__ERROR_BAD_WUFFS_VERSION;
|
||||
return;
|
||||
}
|
||||
|
||||
+19
-11
@@ -31,16 +31,23 @@
|
||||
#error "Wuffs requires a word size of either 32 or 64 bits"
|
||||
#endif
|
||||
|
||||
// WUFFS_VERSION is the major.minor version number as a uint32_t. The major
|
||||
// number is the high 16 bits. The minor number is the low 16 bits.
|
||||
// WUFFS_VERSION is the major.minor.patch version, as per https://semver.org/,
|
||||
// as a uint64_t. The major number is the high 32 bits. The minor number is the
|
||||
// middle 16 bits. The patch number is the low 16 bits. The version extension
|
||||
// (such as "", "beta" or "rc.1") is part of the string representation (such as
|
||||
// "1.2.3-beta") but not the uint64_t representation.
|
||||
//
|
||||
// The intention is to bump the version number at least on every API / ABI
|
||||
// backwards incompatible change.
|
||||
// All three of major, minor and patch being zero means that this is a
|
||||
// work-in-progress version, not a release version, and has no backwards or
|
||||
// forwards compatibility guarantees.
|
||||
//
|
||||
// For now, the API and ABI are simply unstable and can change at any time.
|
||||
//
|
||||
// TODO: don't hard code this in base-header.h.
|
||||
#define WUFFS_VERSION ((uint32_t)0x00001)
|
||||
// !! Some code generation programs can override WUFFS_VERSION.
|
||||
#define WUFFS_VERSION ((uint64_t)0)
|
||||
#define WUFFS_VERSION_MAJOR ((uint64_t)0)
|
||||
#define WUFFS_VERSION_MINOR ((uint64_t)0)
|
||||
#define WUFFS_VERSION_PATCH ((uint64_t)0)
|
||||
#define WUFFS_VERSION_EXTENSION ""
|
||||
#define WUFFS_VERSION_STRING "0.0.0"
|
||||
|
||||
// wuffs_base__empty_struct is used when a Wuffs function returns an empty
|
||||
// struct. In C, if a function f returns void, you can't say "x = f()", but in
|
||||
@@ -1363,7 +1370,7 @@ typedef struct {
|
||||
// Pass sizeof(*self) and WUFFS_VERSION for sizeof_star_self and wuffs_version.
|
||||
void wuffs_deflate__decoder__check_wuffs_version(wuffs_deflate__decoder* self,
|
||||
size_t sizeof_star_self,
|
||||
uint32_t wuffs_version);
|
||||
uint64_t wuffs_version);
|
||||
|
||||
// ---------------- Public Function Prototypes
|
||||
|
||||
@@ -2085,7 +2092,7 @@ static wuffs_deflate__status wuffs_deflate__decoder__decode_huffman_slow(
|
||||
|
||||
void wuffs_deflate__decoder__check_wuffs_version(wuffs_deflate__decoder* self,
|
||||
size_t sizeof_star_self,
|
||||
uint32_t wuffs_version) {
|
||||
uint64_t wuffs_version) {
|
||||
if (!self) {
|
||||
return;
|
||||
}
|
||||
@@ -2093,7 +2100,8 @@ void wuffs_deflate__decoder__check_wuffs_version(wuffs_deflate__decoder* self,
|
||||
self->private_impl.status = WUFFS_DEFLATE__ERROR_BAD_SIZEOF_RECEIVER;
|
||||
return;
|
||||
}
|
||||
if (wuffs_version != WUFFS_VERSION) {
|
||||
if (((wuffs_version >> 32) != WUFFS_VERSION_MAJOR) ||
|
||||
(((wuffs_version >> 16) & 0xFFFF) > WUFFS_VERSION_MINOR)) {
|
||||
self->private_impl.status = WUFFS_DEFLATE__ERROR_BAD_WUFFS_VERSION;
|
||||
return;
|
||||
}
|
||||
|
||||
+20
-12
@@ -31,16 +31,23 @@
|
||||
#error "Wuffs requires a word size of either 32 or 64 bits"
|
||||
#endif
|
||||
|
||||
// WUFFS_VERSION is the major.minor version number as a uint32_t. The major
|
||||
// number is the high 16 bits. The minor number is the low 16 bits.
|
||||
// WUFFS_VERSION is the major.minor.patch version, as per https://semver.org/,
|
||||
// as a uint64_t. The major number is the high 32 bits. The minor number is the
|
||||
// middle 16 bits. The patch number is the low 16 bits. The version extension
|
||||
// (such as "", "beta" or "rc.1") is part of the string representation (such as
|
||||
// "1.2.3-beta") but not the uint64_t representation.
|
||||
//
|
||||
// The intention is to bump the version number at least on every API / ABI
|
||||
// backwards incompatible change.
|
||||
// All three of major, minor and patch being zero means that this is a
|
||||
// work-in-progress version, not a release version, and has no backwards or
|
||||
// forwards compatibility guarantees.
|
||||
//
|
||||
// For now, the API and ABI are simply unstable and can change at any time.
|
||||
//
|
||||
// TODO: don't hard code this in base-header.h.
|
||||
#define WUFFS_VERSION ((uint32_t)0x00001)
|
||||
// !! Some code generation programs can override WUFFS_VERSION.
|
||||
#define WUFFS_VERSION ((uint64_t)0)
|
||||
#define WUFFS_VERSION_MAJOR ((uint64_t)0)
|
||||
#define WUFFS_VERSION_MINOR ((uint64_t)0)
|
||||
#define WUFFS_VERSION_PATCH ((uint64_t)0)
|
||||
#define WUFFS_VERSION_EXTENSION ""
|
||||
#define WUFFS_VERSION_STRING "0.0.0"
|
||||
|
||||
// wuffs_base__empty_struct is used when a Wuffs function returns an empty
|
||||
// struct. In C, if a function f returns void, you can't say "x = f()", but in
|
||||
@@ -1303,7 +1310,7 @@ typedef struct {
|
||||
// Pass sizeof(*self) and WUFFS_VERSION for sizeof_star_self and wuffs_version.
|
||||
void wuffs_lzw__decoder__check_wuffs_version(wuffs_lzw__decoder* self,
|
||||
size_t sizeof_star_self,
|
||||
uint32_t wuffs_version);
|
||||
uint64_t wuffs_version);
|
||||
|
||||
// ---------------- Public Function Prototypes
|
||||
|
||||
@@ -1493,7 +1500,7 @@ typedef struct {
|
||||
// Pass sizeof(*self) and WUFFS_VERSION for sizeof_star_self and wuffs_version.
|
||||
void wuffs_gif__decoder__check_wuffs_version(wuffs_gif__decoder* self,
|
||||
size_t sizeof_star_self,
|
||||
uint32_t wuffs_version);
|
||||
uint64_t wuffs_version);
|
||||
|
||||
// ---------------- Public Function Prototypes
|
||||
|
||||
@@ -2191,7 +2198,7 @@ static wuffs_gif__status wuffs_gif__decoder__copy_to_image_buffer(
|
||||
|
||||
void wuffs_gif__decoder__check_wuffs_version(wuffs_gif__decoder* self,
|
||||
size_t sizeof_star_self,
|
||||
uint32_t wuffs_version) {
|
||||
uint64_t wuffs_version) {
|
||||
if (!self) {
|
||||
return;
|
||||
}
|
||||
@@ -2199,7 +2206,8 @@ void wuffs_gif__decoder__check_wuffs_version(wuffs_gif__decoder* self,
|
||||
self->private_impl.status = WUFFS_GIF__ERROR_BAD_SIZEOF_RECEIVER;
|
||||
return;
|
||||
}
|
||||
if (wuffs_version != WUFFS_VERSION) {
|
||||
if (((wuffs_version >> 32) != WUFFS_VERSION_MAJOR) ||
|
||||
(((wuffs_version >> 16) & 0xFFFF) > WUFFS_VERSION_MINOR)) {
|
||||
self->private_impl.status = WUFFS_GIF__ERROR_BAD_WUFFS_VERSION;
|
||||
return;
|
||||
}
|
||||
|
||||
+21
-13
@@ -31,16 +31,23 @@
|
||||
#error "Wuffs requires a word size of either 32 or 64 bits"
|
||||
#endif
|
||||
|
||||
// WUFFS_VERSION is the major.minor version number as a uint32_t. The major
|
||||
// number is the high 16 bits. The minor number is the low 16 bits.
|
||||
// WUFFS_VERSION is the major.minor.patch version, as per https://semver.org/,
|
||||
// as a uint64_t. The major number is the high 32 bits. The minor number is the
|
||||
// middle 16 bits. The patch number is the low 16 bits. The version extension
|
||||
// (such as "", "beta" or "rc.1") is part of the string representation (such as
|
||||
// "1.2.3-beta") but not the uint64_t representation.
|
||||
//
|
||||
// The intention is to bump the version number at least on every API / ABI
|
||||
// backwards incompatible change.
|
||||
// All three of major, minor and patch being zero means that this is a
|
||||
// work-in-progress version, not a release version, and has no backwards or
|
||||
// forwards compatibility guarantees.
|
||||
//
|
||||
// For now, the API and ABI are simply unstable and can change at any time.
|
||||
//
|
||||
// TODO: don't hard code this in base-header.h.
|
||||
#define WUFFS_VERSION ((uint32_t)0x00001)
|
||||
// !! Some code generation programs can override WUFFS_VERSION.
|
||||
#define WUFFS_VERSION ((uint64_t)0)
|
||||
#define WUFFS_VERSION_MAJOR ((uint64_t)0)
|
||||
#define WUFFS_VERSION_MINOR ((uint64_t)0)
|
||||
#define WUFFS_VERSION_PATCH ((uint64_t)0)
|
||||
#define WUFFS_VERSION_EXTENSION ""
|
||||
#define WUFFS_VERSION_STRING "0.0.0"
|
||||
|
||||
// wuffs_base__empty_struct is used when a Wuffs function returns an empty
|
||||
// struct. In C, if a function f returns void, you can't say "x = f()", but in
|
||||
@@ -1283,7 +1290,7 @@ typedef struct {
|
||||
void wuffs_crc32__ieee_hasher__check_wuffs_version(
|
||||
wuffs_crc32__ieee_hasher* self,
|
||||
size_t sizeof_star_self,
|
||||
uint32_t wuffs_version);
|
||||
uint64_t wuffs_version);
|
||||
|
||||
// ---------------- Public Function Prototypes
|
||||
|
||||
@@ -1467,7 +1474,7 @@ typedef struct {
|
||||
// Pass sizeof(*self) and WUFFS_VERSION for sizeof_star_self and wuffs_version.
|
||||
void wuffs_deflate__decoder__check_wuffs_version(wuffs_deflate__decoder* self,
|
||||
size_t sizeof_star_self,
|
||||
uint32_t wuffs_version);
|
||||
uint64_t wuffs_version);
|
||||
|
||||
// ---------------- Public Function Prototypes
|
||||
|
||||
@@ -1573,7 +1580,7 @@ typedef struct {
|
||||
// Pass sizeof(*self) and WUFFS_VERSION for sizeof_star_self and wuffs_version.
|
||||
void wuffs_gzip__decoder__check_wuffs_version(wuffs_gzip__decoder* self,
|
||||
size_t sizeof_star_self,
|
||||
uint32_t wuffs_version);
|
||||
uint64_t wuffs_version);
|
||||
|
||||
// ---------------- Public Function Prototypes
|
||||
|
||||
@@ -2213,7 +2220,7 @@ const char* wuffs_gzip__status__string(wuffs_gzip__status s) {
|
||||
|
||||
void wuffs_gzip__decoder__check_wuffs_version(wuffs_gzip__decoder* self,
|
||||
size_t sizeof_star_self,
|
||||
uint32_t wuffs_version) {
|
||||
uint64_t wuffs_version) {
|
||||
if (!self) {
|
||||
return;
|
||||
}
|
||||
@@ -2221,7 +2228,8 @@ void wuffs_gzip__decoder__check_wuffs_version(wuffs_gzip__decoder* self,
|
||||
self->private_impl.status = WUFFS_GZIP__ERROR_BAD_SIZEOF_RECEIVER;
|
||||
return;
|
||||
}
|
||||
if (wuffs_version != WUFFS_VERSION) {
|
||||
if (((wuffs_version >> 32) != WUFFS_VERSION_MAJOR) ||
|
||||
(((wuffs_version >> 16) & 0xFFFF) > WUFFS_VERSION_MINOR)) {
|
||||
self->private_impl.status = WUFFS_GZIP__ERROR_BAD_WUFFS_VERSION;
|
||||
return;
|
||||
}
|
||||
|
||||
+19
-11
@@ -31,16 +31,23 @@
|
||||
#error "Wuffs requires a word size of either 32 or 64 bits"
|
||||
#endif
|
||||
|
||||
// WUFFS_VERSION is the major.minor version number as a uint32_t. The major
|
||||
// number is the high 16 bits. The minor number is the low 16 bits.
|
||||
// WUFFS_VERSION is the major.minor.patch version, as per https://semver.org/,
|
||||
// as a uint64_t. The major number is the high 32 bits. The minor number is the
|
||||
// middle 16 bits. The patch number is the low 16 bits. The version extension
|
||||
// (such as "", "beta" or "rc.1") is part of the string representation (such as
|
||||
// "1.2.3-beta") but not the uint64_t representation.
|
||||
//
|
||||
// The intention is to bump the version number at least on every API / ABI
|
||||
// backwards incompatible change.
|
||||
// All three of major, minor and patch being zero means that this is a
|
||||
// work-in-progress version, not a release version, and has no backwards or
|
||||
// forwards compatibility guarantees.
|
||||
//
|
||||
// For now, the API and ABI are simply unstable and can change at any time.
|
||||
//
|
||||
// TODO: don't hard code this in base-header.h.
|
||||
#define WUFFS_VERSION ((uint32_t)0x00001)
|
||||
// !! Some code generation programs can override WUFFS_VERSION.
|
||||
#define WUFFS_VERSION ((uint64_t)0)
|
||||
#define WUFFS_VERSION_MAJOR ((uint64_t)0)
|
||||
#define WUFFS_VERSION_MINOR ((uint64_t)0)
|
||||
#define WUFFS_VERSION_PATCH ((uint64_t)0)
|
||||
#define WUFFS_VERSION_EXTENSION ""
|
||||
#define WUFFS_VERSION_STRING "0.0.0"
|
||||
|
||||
// wuffs_base__empty_struct is used when a Wuffs function returns an empty
|
||||
// struct. In C, if a function f returns void, you can't say "x = f()", but in
|
||||
@@ -1294,7 +1301,7 @@ typedef struct {
|
||||
// Pass sizeof(*self) and WUFFS_VERSION for sizeof_star_self and wuffs_version.
|
||||
void wuffs_lzw__decoder__check_wuffs_version(wuffs_lzw__decoder* self,
|
||||
size_t sizeof_star_self,
|
||||
uint32_t wuffs_version);
|
||||
uint64_t wuffs_version);
|
||||
|
||||
// ---------------- Public Function Prototypes
|
||||
|
||||
@@ -1928,7 +1935,7 @@ const char* wuffs_lzw__status__string(wuffs_lzw__status s) {
|
||||
|
||||
void wuffs_lzw__decoder__check_wuffs_version(wuffs_lzw__decoder* self,
|
||||
size_t sizeof_star_self,
|
||||
uint32_t wuffs_version) {
|
||||
uint64_t wuffs_version) {
|
||||
if (!self) {
|
||||
return;
|
||||
}
|
||||
@@ -1936,7 +1943,8 @@ void wuffs_lzw__decoder__check_wuffs_version(wuffs_lzw__decoder* self,
|
||||
self->private_impl.status = WUFFS_LZW__ERROR_BAD_SIZEOF_RECEIVER;
|
||||
return;
|
||||
}
|
||||
if (wuffs_version != WUFFS_VERSION) {
|
||||
if (((wuffs_version >> 32) != WUFFS_VERSION_MAJOR) ||
|
||||
(((wuffs_version >> 16) & 0xFFFF) > WUFFS_VERSION_MINOR)) {
|
||||
self->private_impl.status = WUFFS_LZW__ERROR_BAD_WUFFS_VERSION;
|
||||
return;
|
||||
}
|
||||
|
||||
+21
-13
@@ -31,16 +31,23 @@
|
||||
#error "Wuffs requires a word size of either 32 or 64 bits"
|
||||
#endif
|
||||
|
||||
// WUFFS_VERSION is the major.minor version number as a uint32_t. The major
|
||||
// number is the high 16 bits. The minor number is the low 16 bits.
|
||||
// WUFFS_VERSION is the major.minor.patch version, as per https://semver.org/,
|
||||
// as a uint64_t. The major number is the high 32 bits. The minor number is the
|
||||
// middle 16 bits. The patch number is the low 16 bits. The version extension
|
||||
// (such as "", "beta" or "rc.1") is part of the string representation (such as
|
||||
// "1.2.3-beta") but not the uint64_t representation.
|
||||
//
|
||||
// The intention is to bump the version number at least on every API / ABI
|
||||
// backwards incompatible change.
|
||||
// All three of major, minor and patch being zero means that this is a
|
||||
// work-in-progress version, not a release version, and has no backwards or
|
||||
// forwards compatibility guarantees.
|
||||
//
|
||||
// For now, the API and ABI are simply unstable and can change at any time.
|
||||
//
|
||||
// TODO: don't hard code this in base-header.h.
|
||||
#define WUFFS_VERSION ((uint32_t)0x00001)
|
||||
// !! Some code generation programs can override WUFFS_VERSION.
|
||||
#define WUFFS_VERSION ((uint64_t)0)
|
||||
#define WUFFS_VERSION_MAJOR ((uint64_t)0)
|
||||
#define WUFFS_VERSION_MINOR ((uint64_t)0)
|
||||
#define WUFFS_VERSION_PATCH ((uint64_t)0)
|
||||
#define WUFFS_VERSION_EXTENSION ""
|
||||
#define WUFFS_VERSION_STRING "0.0.0"
|
||||
|
||||
// wuffs_base__empty_struct is used when a Wuffs function returns an empty
|
||||
// struct. In C, if a function f returns void, you can't say "x = f()", but in
|
||||
@@ -1284,7 +1291,7 @@ typedef struct {
|
||||
// Pass sizeof(*self) and WUFFS_VERSION for sizeof_star_self and wuffs_version.
|
||||
void wuffs_adler32__hasher__check_wuffs_version(wuffs_adler32__hasher* self,
|
||||
size_t sizeof_star_self,
|
||||
uint32_t wuffs_version);
|
||||
uint64_t wuffs_version);
|
||||
|
||||
// ---------------- Public Function Prototypes
|
||||
|
||||
@@ -1468,7 +1475,7 @@ typedef struct {
|
||||
// Pass sizeof(*self) and WUFFS_VERSION for sizeof_star_self and wuffs_version.
|
||||
void wuffs_deflate__decoder__check_wuffs_version(wuffs_deflate__decoder* self,
|
||||
size_t sizeof_star_self,
|
||||
uint32_t wuffs_version);
|
||||
uint64_t wuffs_version);
|
||||
|
||||
// ---------------- Public Function Prototypes
|
||||
|
||||
@@ -1572,7 +1579,7 @@ typedef struct {
|
||||
// Pass sizeof(*self) and WUFFS_VERSION for sizeof_star_self and wuffs_version.
|
||||
void wuffs_zlib__decoder__check_wuffs_version(wuffs_zlib__decoder* self,
|
||||
size_t sizeof_star_self,
|
||||
uint32_t wuffs_version);
|
||||
uint64_t wuffs_version);
|
||||
|
||||
// ---------------- Public Function Prototypes
|
||||
|
||||
@@ -2213,7 +2220,7 @@ const char* wuffs_zlib__status__string(wuffs_zlib__status s) {
|
||||
|
||||
void wuffs_zlib__decoder__check_wuffs_version(wuffs_zlib__decoder* self,
|
||||
size_t sizeof_star_self,
|
||||
uint32_t wuffs_version) {
|
||||
uint64_t wuffs_version) {
|
||||
if (!self) {
|
||||
return;
|
||||
}
|
||||
@@ -2221,7 +2228,8 @@ void wuffs_zlib__decoder__check_wuffs_version(wuffs_zlib__decoder* self,
|
||||
self->private_impl.status = WUFFS_ZLIB__ERROR_BAD_SIZEOF_RECEIVER;
|
||||
return;
|
||||
}
|
||||
if (wuffs_version != WUFFS_VERSION) {
|
||||
if (((wuffs_version >> 32) != WUFFS_VERSION_MAJOR) ||
|
||||
(((wuffs_version >> 16) & 0xFFFF) > WUFFS_VERSION_MINOR)) {
|
||||
self->private_impl.status = WUFFS_ZLIB__ERROR_BAD_WUFFS_VERSION;
|
||||
return;
|
||||
}
|
||||
|
||||
+16
-9
@@ -31,16 +31,23 @@
|
||||
#error "Wuffs requires a word size of either 32 or 64 bits"
|
||||
#endif
|
||||
|
||||
// WUFFS_VERSION is the major.minor version number as a uint32_t. The major
|
||||
// number is the high 16 bits. The minor number is the low 16 bits.
|
||||
// WUFFS_VERSION is the major.minor.patch version, as per https://semver.org/,
|
||||
// as a uint64_t. The major number is the high 32 bits. The minor number is the
|
||||
// middle 16 bits. The patch number is the low 16 bits. The version extension
|
||||
// (such as "", "beta" or "rc.1") is part of the string representation (such as
|
||||
// "1.2.3-beta") but not the uint64_t representation.
|
||||
//
|
||||
// The intention is to bump the version number at least on every API / ABI
|
||||
// backwards incompatible change.
|
||||
// All three of major, minor and patch being zero means that this is a
|
||||
// work-in-progress version, not a release version, and has no backwards or
|
||||
// forwards compatibility guarantees.
|
||||
//
|
||||
// For now, the API and ABI are simply unstable and can change at any time.
|
||||
//
|
||||
// TODO: don't hard code this in base-header.h.
|
||||
#define WUFFS_VERSION ((uint32_t)0x00001)
|
||||
// !! Some code generation programs can override WUFFS_VERSION.
|
||||
#define WUFFS_VERSION ((uint64_t)0)
|
||||
#define WUFFS_VERSION_MAJOR ((uint64_t)0)
|
||||
#define WUFFS_VERSION_MINOR ((uint64_t)0)
|
||||
#define WUFFS_VERSION_PATCH ((uint64_t)0)
|
||||
#define WUFFS_VERSION_EXTENSION ""
|
||||
#define WUFFS_VERSION_STRING "0.0.0"
|
||||
|
||||
// wuffs_base__empty_struct is used when a Wuffs function returns an empty
|
||||
// struct. In C, if a function f returns void, you can't say "x = f()", but in
|
||||
@@ -1275,7 +1282,7 @@ typedef struct {
|
||||
// Pass sizeof(*self) and WUFFS_VERSION for sizeof_star_self and wuffs_version.
|
||||
void wuffs_adler32__hasher__check_wuffs_version(wuffs_adler32__hasher* self,
|
||||
size_t sizeof_star_self,
|
||||
uint32_t wuffs_version);
|
||||
uint64_t wuffs_version);
|
||||
|
||||
// ---------------- Public Function Prototypes
|
||||
|
||||
|
||||
+16
-9
@@ -31,16 +31,23 @@
|
||||
#error "Wuffs requires a word size of either 32 or 64 bits"
|
||||
#endif
|
||||
|
||||
// WUFFS_VERSION is the major.minor version number as a uint32_t. The major
|
||||
// number is the high 16 bits. The minor number is the low 16 bits.
|
||||
// WUFFS_VERSION is the major.minor.patch version, as per https://semver.org/,
|
||||
// as a uint64_t. The major number is the high 32 bits. The minor number is the
|
||||
// middle 16 bits. The patch number is the low 16 bits. The version extension
|
||||
// (such as "", "beta" or "rc.1") is part of the string representation (such as
|
||||
// "1.2.3-beta") but not the uint64_t representation.
|
||||
//
|
||||
// The intention is to bump the version number at least on every API / ABI
|
||||
// backwards incompatible change.
|
||||
// All three of major, minor and patch being zero means that this is a
|
||||
// work-in-progress version, not a release version, and has no backwards or
|
||||
// forwards compatibility guarantees.
|
||||
//
|
||||
// For now, the API and ABI are simply unstable and can change at any time.
|
||||
//
|
||||
// TODO: don't hard code this in base-header.h.
|
||||
#define WUFFS_VERSION ((uint32_t)0x00001)
|
||||
// !! Some code generation programs can override WUFFS_VERSION.
|
||||
#define WUFFS_VERSION ((uint64_t)0)
|
||||
#define WUFFS_VERSION_MAJOR ((uint64_t)0)
|
||||
#define WUFFS_VERSION_MINOR ((uint64_t)0)
|
||||
#define WUFFS_VERSION_PATCH ((uint64_t)0)
|
||||
#define WUFFS_VERSION_EXTENSION ""
|
||||
#define WUFFS_VERSION_STRING "0.0.0"
|
||||
|
||||
// wuffs_base__empty_struct is used when a Wuffs function returns an empty
|
||||
// struct. In C, if a function f returns void, you can't say "x = f()", but in
|
||||
@@ -1274,7 +1281,7 @@ typedef struct {
|
||||
void wuffs_crc32__ieee_hasher__check_wuffs_version(
|
||||
wuffs_crc32__ieee_hasher* self,
|
||||
size_t sizeof_star_self,
|
||||
uint32_t wuffs_version);
|
||||
uint64_t wuffs_version);
|
||||
|
||||
// ---------------- Public Function Prototypes
|
||||
|
||||
|
||||
+16
-9
@@ -31,16 +31,23 @@
|
||||
#error "Wuffs requires a word size of either 32 or 64 bits"
|
||||
#endif
|
||||
|
||||
// WUFFS_VERSION is the major.minor version number as a uint32_t. The major
|
||||
// number is the high 16 bits. The minor number is the low 16 bits.
|
||||
// WUFFS_VERSION is the major.minor.patch version, as per https://semver.org/,
|
||||
// as a uint64_t. The major number is the high 32 bits. The minor number is the
|
||||
// middle 16 bits. The patch number is the low 16 bits. The version extension
|
||||
// (such as "", "beta" or "rc.1") is part of the string representation (such as
|
||||
// "1.2.3-beta") but not the uint64_t representation.
|
||||
//
|
||||
// The intention is to bump the version number at least on every API / ABI
|
||||
// backwards incompatible change.
|
||||
// All three of major, minor and patch being zero means that this is a
|
||||
// work-in-progress version, not a release version, and has no backwards or
|
||||
// forwards compatibility guarantees.
|
||||
//
|
||||
// For now, the API and ABI are simply unstable and can change at any time.
|
||||
//
|
||||
// TODO: don't hard code this in base-header.h.
|
||||
#define WUFFS_VERSION ((uint32_t)0x00001)
|
||||
// !! Some code generation programs can override WUFFS_VERSION.
|
||||
#define WUFFS_VERSION ((uint64_t)0)
|
||||
#define WUFFS_VERSION_MAJOR ((uint64_t)0)
|
||||
#define WUFFS_VERSION_MINOR ((uint64_t)0)
|
||||
#define WUFFS_VERSION_PATCH ((uint64_t)0)
|
||||
#define WUFFS_VERSION_EXTENSION ""
|
||||
#define WUFFS_VERSION_STRING "0.0.0"
|
||||
|
||||
// wuffs_base__empty_struct is used when a Wuffs function returns an empty
|
||||
// struct. In C, if a function f returns void, you can't say "x = f()", but in
|
||||
@@ -1363,7 +1370,7 @@ typedef struct {
|
||||
// Pass sizeof(*self) and WUFFS_VERSION for sizeof_star_self and wuffs_version.
|
||||
void wuffs_deflate__decoder__check_wuffs_version(wuffs_deflate__decoder* self,
|
||||
size_t sizeof_star_self,
|
||||
uint32_t wuffs_version);
|
||||
uint64_t wuffs_version);
|
||||
|
||||
// ---------------- Public Function Prototypes
|
||||
|
||||
|
||||
+17
-10
@@ -31,16 +31,23 @@
|
||||
#error "Wuffs requires a word size of either 32 or 64 bits"
|
||||
#endif
|
||||
|
||||
// WUFFS_VERSION is the major.minor version number as a uint32_t. The major
|
||||
// number is the high 16 bits. The minor number is the low 16 bits.
|
||||
// WUFFS_VERSION is the major.minor.patch version, as per https://semver.org/,
|
||||
// as a uint64_t. The major number is the high 32 bits. The minor number is the
|
||||
// middle 16 bits. The patch number is the low 16 bits. The version extension
|
||||
// (such as "", "beta" or "rc.1") is part of the string representation (such as
|
||||
// "1.2.3-beta") but not the uint64_t representation.
|
||||
//
|
||||
// The intention is to bump the version number at least on every API / ABI
|
||||
// backwards incompatible change.
|
||||
// All three of major, minor and patch being zero means that this is a
|
||||
// work-in-progress version, not a release version, and has no backwards or
|
||||
// forwards compatibility guarantees.
|
||||
//
|
||||
// For now, the API and ABI are simply unstable and can change at any time.
|
||||
//
|
||||
// TODO: don't hard code this in base-header.h.
|
||||
#define WUFFS_VERSION ((uint32_t)0x00001)
|
||||
// !! Some code generation programs can override WUFFS_VERSION.
|
||||
#define WUFFS_VERSION ((uint64_t)0)
|
||||
#define WUFFS_VERSION_MAJOR ((uint64_t)0)
|
||||
#define WUFFS_VERSION_MINOR ((uint64_t)0)
|
||||
#define WUFFS_VERSION_PATCH ((uint64_t)0)
|
||||
#define WUFFS_VERSION_EXTENSION ""
|
||||
#define WUFFS_VERSION_STRING "0.0.0"
|
||||
|
||||
// wuffs_base__empty_struct is used when a Wuffs function returns an empty
|
||||
// struct. In C, if a function f returns void, you can't say "x = f()", but in
|
||||
@@ -1303,7 +1310,7 @@ typedef struct {
|
||||
// Pass sizeof(*self) and WUFFS_VERSION for sizeof_star_self and wuffs_version.
|
||||
void wuffs_lzw__decoder__check_wuffs_version(wuffs_lzw__decoder* self,
|
||||
size_t sizeof_star_self,
|
||||
uint32_t wuffs_version);
|
||||
uint64_t wuffs_version);
|
||||
|
||||
// ---------------- Public Function Prototypes
|
||||
|
||||
@@ -1493,7 +1500,7 @@ typedef struct {
|
||||
// Pass sizeof(*self) and WUFFS_VERSION for sizeof_star_self and wuffs_version.
|
||||
void wuffs_gif__decoder__check_wuffs_version(wuffs_gif__decoder* self,
|
||||
size_t sizeof_star_self,
|
||||
uint32_t wuffs_version);
|
||||
uint64_t wuffs_version);
|
||||
|
||||
// ---------------- Public Function Prototypes
|
||||
|
||||
|
||||
+18
-11
@@ -31,16 +31,23 @@
|
||||
#error "Wuffs requires a word size of either 32 or 64 bits"
|
||||
#endif
|
||||
|
||||
// WUFFS_VERSION is the major.minor version number as a uint32_t. The major
|
||||
// number is the high 16 bits. The minor number is the low 16 bits.
|
||||
// WUFFS_VERSION is the major.minor.patch version, as per https://semver.org/,
|
||||
// as a uint64_t. The major number is the high 32 bits. The minor number is the
|
||||
// middle 16 bits. The patch number is the low 16 bits. The version extension
|
||||
// (such as "", "beta" or "rc.1") is part of the string representation (such as
|
||||
// "1.2.3-beta") but not the uint64_t representation.
|
||||
//
|
||||
// The intention is to bump the version number at least on every API / ABI
|
||||
// backwards incompatible change.
|
||||
// All three of major, minor and patch being zero means that this is a
|
||||
// work-in-progress version, not a release version, and has no backwards or
|
||||
// forwards compatibility guarantees.
|
||||
//
|
||||
// For now, the API and ABI are simply unstable and can change at any time.
|
||||
//
|
||||
// TODO: don't hard code this in base-header.h.
|
||||
#define WUFFS_VERSION ((uint32_t)0x00001)
|
||||
// !! Some code generation programs can override WUFFS_VERSION.
|
||||
#define WUFFS_VERSION ((uint64_t)0)
|
||||
#define WUFFS_VERSION_MAJOR ((uint64_t)0)
|
||||
#define WUFFS_VERSION_MINOR ((uint64_t)0)
|
||||
#define WUFFS_VERSION_PATCH ((uint64_t)0)
|
||||
#define WUFFS_VERSION_EXTENSION ""
|
||||
#define WUFFS_VERSION_STRING "0.0.0"
|
||||
|
||||
// wuffs_base__empty_struct is used when a Wuffs function returns an empty
|
||||
// struct. In C, if a function f returns void, you can't say "x = f()", but in
|
||||
@@ -1283,7 +1290,7 @@ typedef struct {
|
||||
void wuffs_crc32__ieee_hasher__check_wuffs_version(
|
||||
wuffs_crc32__ieee_hasher* self,
|
||||
size_t sizeof_star_self,
|
||||
uint32_t wuffs_version);
|
||||
uint64_t wuffs_version);
|
||||
|
||||
// ---------------- Public Function Prototypes
|
||||
|
||||
@@ -1467,7 +1474,7 @@ typedef struct {
|
||||
// Pass sizeof(*self) and WUFFS_VERSION for sizeof_star_self and wuffs_version.
|
||||
void wuffs_deflate__decoder__check_wuffs_version(wuffs_deflate__decoder* self,
|
||||
size_t sizeof_star_self,
|
||||
uint32_t wuffs_version);
|
||||
uint64_t wuffs_version);
|
||||
|
||||
// ---------------- Public Function Prototypes
|
||||
|
||||
@@ -1573,7 +1580,7 @@ typedef struct {
|
||||
// Pass sizeof(*self) and WUFFS_VERSION for sizeof_star_self and wuffs_version.
|
||||
void wuffs_gzip__decoder__check_wuffs_version(wuffs_gzip__decoder* self,
|
||||
size_t sizeof_star_self,
|
||||
uint32_t wuffs_version);
|
||||
uint64_t wuffs_version);
|
||||
|
||||
// ---------------- Public Function Prototypes
|
||||
|
||||
|
||||
+16
-9
@@ -31,16 +31,23 @@
|
||||
#error "Wuffs requires a word size of either 32 or 64 bits"
|
||||
#endif
|
||||
|
||||
// WUFFS_VERSION is the major.minor version number as a uint32_t. The major
|
||||
// number is the high 16 bits. The minor number is the low 16 bits.
|
||||
// WUFFS_VERSION is the major.minor.patch version, as per https://semver.org/,
|
||||
// as a uint64_t. The major number is the high 32 bits. The minor number is the
|
||||
// middle 16 bits. The patch number is the low 16 bits. The version extension
|
||||
// (such as "", "beta" or "rc.1") is part of the string representation (such as
|
||||
// "1.2.3-beta") but not the uint64_t representation.
|
||||
//
|
||||
// The intention is to bump the version number at least on every API / ABI
|
||||
// backwards incompatible change.
|
||||
// All three of major, minor and patch being zero means that this is a
|
||||
// work-in-progress version, not a release version, and has no backwards or
|
||||
// forwards compatibility guarantees.
|
||||
//
|
||||
// For now, the API and ABI are simply unstable and can change at any time.
|
||||
//
|
||||
// TODO: don't hard code this in base-header.h.
|
||||
#define WUFFS_VERSION ((uint32_t)0x00001)
|
||||
// !! Some code generation programs can override WUFFS_VERSION.
|
||||
#define WUFFS_VERSION ((uint64_t)0)
|
||||
#define WUFFS_VERSION_MAJOR ((uint64_t)0)
|
||||
#define WUFFS_VERSION_MINOR ((uint64_t)0)
|
||||
#define WUFFS_VERSION_PATCH ((uint64_t)0)
|
||||
#define WUFFS_VERSION_EXTENSION ""
|
||||
#define WUFFS_VERSION_STRING "0.0.0"
|
||||
|
||||
// wuffs_base__empty_struct is used when a Wuffs function returns an empty
|
||||
// struct. In C, if a function f returns void, you can't say "x = f()", but in
|
||||
@@ -1294,7 +1301,7 @@ typedef struct {
|
||||
// Pass sizeof(*self) and WUFFS_VERSION for sizeof_star_self and wuffs_version.
|
||||
void wuffs_lzw__decoder__check_wuffs_version(wuffs_lzw__decoder* self,
|
||||
size_t sizeof_star_self,
|
||||
uint32_t wuffs_version);
|
||||
uint64_t wuffs_version);
|
||||
|
||||
// ---------------- Public Function Prototypes
|
||||
|
||||
|
||||
+18
-11
@@ -31,16 +31,23 @@
|
||||
#error "Wuffs requires a word size of either 32 or 64 bits"
|
||||
#endif
|
||||
|
||||
// WUFFS_VERSION is the major.minor version number as a uint32_t. The major
|
||||
// number is the high 16 bits. The minor number is the low 16 bits.
|
||||
// WUFFS_VERSION is the major.minor.patch version, as per https://semver.org/,
|
||||
// as a uint64_t. The major number is the high 32 bits. The minor number is the
|
||||
// middle 16 bits. The patch number is the low 16 bits. The version extension
|
||||
// (such as "", "beta" or "rc.1") is part of the string representation (such as
|
||||
// "1.2.3-beta") but not the uint64_t representation.
|
||||
//
|
||||
// The intention is to bump the version number at least on every API / ABI
|
||||
// backwards incompatible change.
|
||||
// All three of major, minor and patch being zero means that this is a
|
||||
// work-in-progress version, not a release version, and has no backwards or
|
||||
// forwards compatibility guarantees.
|
||||
//
|
||||
// For now, the API and ABI are simply unstable and can change at any time.
|
||||
//
|
||||
// TODO: don't hard code this in base-header.h.
|
||||
#define WUFFS_VERSION ((uint32_t)0x00001)
|
||||
// !! Some code generation programs can override WUFFS_VERSION.
|
||||
#define WUFFS_VERSION ((uint64_t)0)
|
||||
#define WUFFS_VERSION_MAJOR ((uint64_t)0)
|
||||
#define WUFFS_VERSION_MINOR ((uint64_t)0)
|
||||
#define WUFFS_VERSION_PATCH ((uint64_t)0)
|
||||
#define WUFFS_VERSION_EXTENSION ""
|
||||
#define WUFFS_VERSION_STRING "0.0.0"
|
||||
|
||||
// wuffs_base__empty_struct is used when a Wuffs function returns an empty
|
||||
// struct. In C, if a function f returns void, you can't say "x = f()", but in
|
||||
@@ -1284,7 +1291,7 @@ typedef struct {
|
||||
// Pass sizeof(*self) and WUFFS_VERSION for sizeof_star_self and wuffs_version.
|
||||
void wuffs_adler32__hasher__check_wuffs_version(wuffs_adler32__hasher* self,
|
||||
size_t sizeof_star_self,
|
||||
uint32_t wuffs_version);
|
||||
uint64_t wuffs_version);
|
||||
|
||||
// ---------------- Public Function Prototypes
|
||||
|
||||
@@ -1468,7 +1475,7 @@ typedef struct {
|
||||
// Pass sizeof(*self) and WUFFS_VERSION for sizeof_star_self and wuffs_version.
|
||||
void wuffs_deflate__decoder__check_wuffs_version(wuffs_deflate__decoder* self,
|
||||
size_t sizeof_star_self,
|
||||
uint32_t wuffs_version);
|
||||
uint64_t wuffs_version);
|
||||
|
||||
// ---------------- Public Function Prototypes
|
||||
|
||||
@@ -1572,7 +1579,7 @@ typedef struct {
|
||||
// Pass sizeof(*self) and WUFFS_VERSION for sizeof_star_self and wuffs_version.
|
||||
void wuffs_zlib__decoder__check_wuffs_version(wuffs_zlib__decoder* self,
|
||||
size_t sizeof_star_self,
|
||||
uint32_t wuffs_version);
|
||||
uint64_t wuffs_version);
|
||||
|
||||
// ---------------- Public Function Prototypes
|
||||
|
||||
|
||||
Reference in new issue
Block a user