mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-25 00:55:11 +01:00
Redo the encoding of error codes
This commit is contained in:
1 parent
2ac2424e77
commit
43bb14e886
29 files changed
+1069
-1021
No files matched your search
+8
-1
@@ -69,7 +69,14 @@ typedef struct {
|
||||
// --------
|
||||
|
||||
// A status code is either zero (OK), positive (a recoverable suspension or
|
||||
// pause in processing) or negative (a non-recoverable error).
|
||||
// pause in processing) or negative (a non-recoverable error). Its bits:
|
||||
// - bit 31 (the sign bit) indicates unrecoverable-ness: an error.
|
||||
// - bits 30 .. 24 are a package-namespaced numeric code
|
||||
// - bits 23 .. 21 are reserved.
|
||||
// - bits 20 .. 0 are the packageid (a namespace) as a base38 value.
|
||||
//
|
||||
// Do not manipulate these bits directly; they are private implementation
|
||||
// details. Use methods such as wuffs_base__status__is_error instead.
|
||||
typedef int32_t wuffs_base__status;
|
||||
|
||||
#define WUFFS_BASE__STATUS_OK 0 // 0x00000000
|
||||
|
||||
Reference in new issue
Block a user