Generate C code for "if foo?()".

This commit is contained in:
Nigel Tao committed 2017-06-16 13:05:07 +10:00
1 parent f4db300358
commit 8882085f91
5 files changed
+74 -9

No files matched your search

+1 -2
View File
@@ -5,11 +5,10 @@ pub error "bad GIF header"
pub struct decoder?(
lzw lzw_decoder,
temporary_hack u32,
)
pub func decoder.decode?(dst ptr buf1, src ptr buf1)() {
if this.temporary_hack != 0x47 {
if (in.src.read_u8?() != 0x47) or (in.src.read_u8?() != 0x49) {
return error "bad GIF header"
}
}