mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 16:52:18 +01:00
Add a call sequence concept
This commit is contained in:
1 parent
9a463d4675
commit
de9000cc70
10 files changed
+191
-72
No files matched your search
+5
-3
@@ -138,7 +138,8 @@ typedef int32_t wuffs_deflate__status;
|
||||
#define WUFFS_DEFLATE__SUSPENSION_SHORT_READ 8 // 0x00000008
|
||||
#define WUFFS_DEFLATE__SUSPENSION_SHORT_WRITE 9 // 0x00000009
|
||||
#define WUFFS_DEFLATE__ERROR_CANNOT_RETURN_A_SUSPENSION \
|
||||
-2147483638 // 0x8000000A
|
||||
-2147483638 // 0x8000000A
|
||||
#define WUFFS_DEFLATE__ERROR_INVALID_CALL_SEQUENCE -2147483637 // 0x8000000B
|
||||
|
||||
#define WUFFS_DEFLATE__ERROR_BAD_HUFFMAN_CODE_OVER_SUBSCRIBED \
|
||||
-1278585856 // 0xB3CA5400
|
||||
@@ -623,7 +624,7 @@ static inline wuffs_base__empty_struct wuffs_base__writer1__mark(
|
||||
return ((wuffs_base__empty_struct){});
|
||||
}
|
||||
|
||||
static const char* wuffs_base__status__strings[11] = {
|
||||
static const char* wuffs_base__status__strings[12] = {
|
||||
"ok",
|
||||
"bad wuffs version",
|
||||
"bad receiver",
|
||||
@@ -635,6 +636,7 @@ static const char* wuffs_base__status__strings[11] = {
|
||||
"short read",
|
||||
"short write",
|
||||
"cannot return a suspension",
|
||||
"invalid call sequence",
|
||||
};
|
||||
|
||||
#endif // WUFFS_BASE_IMPL_H
|
||||
@@ -671,7 +673,7 @@ const char* wuffs_deflate__status__string(wuffs_deflate__status s) {
|
||||
switch ((s >> 10) & 0x1FFFFF) {
|
||||
case 0:
|
||||
a = wuffs_base__status__strings;
|
||||
n = 11;
|
||||
n = 12;
|
||||
break;
|
||||
case wuffs_deflate__packageid:
|
||||
a = wuffs_deflate__status__strings;
|
||||
|
||||
Reference in new issue
Block a user