mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-22 16:47:28 +01:00
Decode a GIF's loop count
This commit is contained in:
1 parent
ded38a043a
commit
584fc631a8
5 files changed
+636
-60
No files matched your search
@@ -549,6 +549,14 @@ func (g *gen) writeCallSuspendibles(b *buffer, n *a.Expr, depth uint32) error {
|
||||
}
|
||||
b.writes("if (status) { goto suspend; }\n")
|
||||
|
||||
} else if isThisMethod(g.tm, n, "decode_ae", 1) {
|
||||
b.printf("status = %s%s__decode_ae(self, %ssrc);\n",
|
||||
g.pkgPrefix, g.currFunk.astFunc.Receiver().Str(g.tm), aPrefix)
|
||||
if err := g.writeLoadExprDerivedVars(b, n); err != nil {
|
||||
return err
|
||||
}
|
||||
b.writes("if (status) { goto suspend; }\n")
|
||||
|
||||
} else if isThisMethod(g.tm, n, "decode_id", 2) {
|
||||
b.printf("status = %s%s__decode_id(self, %sdst, %ssrc);\n",
|
||||
g.pkgPrefix, g.currFunk.astFunc.Receiver().Str(g.tm), aPrefix, aPrefix)
|
||||
@@ -557,6 +565,14 @@ func (g *gen) writeCallSuspendibles(b *buffer, n *a.Expr, depth uint32) error {
|
||||
}
|
||||
b.writes("if (status) { goto suspend; }\n")
|
||||
|
||||
} else if isThisMethod(g.tm, n, "skip_blocks", 1) {
|
||||
b.printf("status = %s%s__skip_blocks(self, %ssrc);\n",
|
||||
g.pkgPrefix, g.currFunk.astFunc.Receiver().Str(g.tm), aPrefix)
|
||||
if err := g.writeLoadExprDerivedVars(b, n); err != nil {
|
||||
return err
|
||||
}
|
||||
b.writes("if (status) { goto suspend; }\n")
|
||||
|
||||
} else if isThisMethod(g.tm, n, "decode_blocks", 2) {
|
||||
// TODO: don't hard code being inside a try call.
|
||||
if g.currFunk.tempW > maxTemp {
|
||||
|
||||
Reference in new issue
Block a user