Make gif's decoder.copy_to_image_buffer ! not !?

This commit is contained in:
Nigel Tao committed 2018-12-28 17:32:48 +11:00
1 parent 19ddd4450f
commit 3ba450ba55
6 files changed
+58 -28

No files matched your search

+8 -3
View File
@@ -101,6 +101,7 @@ const (
FlagsGlobalIdent = Flags(0x00000800)
FlagsClassy = Flags(0x00001000)
FlagsSubExprHasEffect = Flags(0x00002000)
FlagsRetsError = Flags(0x00004000)
)
func (f Flags) AsEffect() Effect { return Effect(f) }
@@ -588,13 +589,17 @@ func NewIf(condition *Expr, bodyIfTrue []*Node, bodyIfFalse []*Node, elseIf *If)
}
// Ret is "return LHS" or "yield LHS":
// - FlagsReturnsError LHS is an error status
// - ID0: <IDReturn|IDYield>
// - LHS: <Expr>
type Ret Node
func (n *Ret) AsNode() *Node { return (*Node)(n) }
func (n *Ret) Keyword() t.ID { return n.id0 }
func (n *Ret) Value() *Expr { return n.lhs.AsExpr() }
func (n *Ret) AsNode() *Node { return (*Node)(n) }
func (n *Ret) RetsError() bool { return n.flags&FlagsRetsError != 0 }
func (n *Ret) Keyword() t.ID { return n.id0 }
func (n *Ret) Value() *Expr { return n.lhs.AsExpr() }
func (n *Ret) SetRetsError() { n.flags |= FlagsRetsError }
func NewRet(keyword t.ID, value *Expr) *Ret {
return &Ret{
+1 -5
View File
@@ -78,15 +78,11 @@ func (n *Expr) appendStr(buf []byte, tm *t.Map, parenthesize bool, depth uint32)
} else {
switch n.id0 {
case t.IDStatus:
buf = append(buf, "status "...)
case 0:
if n.id1 != 0 {
buf = append(buf, tm.ByID(n.id1)...)
buf = append(buf, '.')
}
fallthrough
case 0:
buf = append(buf, tm.ByID(n.id2)...)
case t.IDOpenParen: