Make wuffs_base__status a struct

This commit is contained in:
Nigel Tao committed 2020-01-05 10:48:20 +11:00
1 parent c50f16e58b
commit e6db7f6a40
24 files changed
+677 -499

No files matched your search

+4 -4
View File
@@ -67,10 +67,10 @@ receiver"` is an error and `"$short read"` is a suspension:
## C Implementation
In terms of C implementation, a status value is just its string message: a
`const char *`, with `ok` being the null pointer. That C string is statically
allocated and should never be `free`'d. Status values can be compared by the
`==` operator and not just by `strcmp`.
In terms of C implementation, a status' `repr` (representation) is just its
string message: a `const char *`, with `ok` being the null pointer. That C
string is statically allocated and should never be `free`'d. Status `repr`s can
be compared by the `==` operator and not just by `strcmp`.
The C string's contents has the Wuffs package name inserted by the Wuffs
compiler, just after that first byte. For example, the `std/deflate` package