mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 08:32:11 +01:00
Generate C code for "self.foo?()".
This commit is contained in:
1 parent
e6f5fd7f53
commit
cd526ccafe
5 files changed
+113
-55
No files matched your search
@@ -10,7 +10,11 @@ pub struct decoder?(
|
||||
)
|
||||
|
||||
pub func decoder.decode?(dst ptr buf1, src ptr buf1)() {
|
||||
// Read either "GIF87a" or "GIF89a".
|
||||
this.decode_header?(src:in.src)
|
||||
}
|
||||
|
||||
// decode_header reads either "GIF87a" or "GIF89a".
|
||||
pri func decoder.decode_header?(src ptr buf1)() {
|
||||
if (in.src.read_u8?() != 0x47) or (in.src.read_u8?() != 0x49) or
|
||||
(in.src.read_u8?() != 0x46) or (in.src.read_u8?() != 0x38) {
|
||||
return error "bad GIF header"
|
||||
|
||||
Reference in new issue
Block a user