mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-21 16:47:28 +01:00
Have copy_from return the number of bytes copied.
This commit is contained in:
1 parent
a9bdeee7c1
commit
f1643be221
9 files changed
+38
-28
No files matched your search
+2
-3
@@ -436,8 +436,7 @@ func (q *checker) tcheckExprOther(n *a.Expr, depth uint32) error {
|
||||
}
|
||||
// TODO: delete this hack that only matches "foo.set_literal_width(etc)".
|
||||
if isThatMethod(q.tm, n, q.tm.ByName("set_literal_width").Key(), 1) ||
|
||||
isThatMethod(q.tm, n, q.tm.ByName("decode").Key(), 2) ||
|
||||
isThatMethod(q.tm, n, t.KeyCopyFrom, 1) {
|
||||
isThatMethod(q.tm, n, q.tm.ByName("decode").Key(), 2) {
|
||||
foo := n.LHS().Expr().LHS().Expr()
|
||||
if err := q.tcheckExpr(foo, depth); err != nil {
|
||||
return err
|
||||
@@ -453,7 +452,7 @@ func (q *checker) tcheckExprOther(n *a.Expr, depth uint32) error {
|
||||
return nil
|
||||
}
|
||||
// TODO: delete this hack that only matches "foo.length(etc)".
|
||||
if isThatMethod(q.tm, n, t.KeyLength, 0) {
|
||||
if isThatMethod(q.tm, n, t.KeyCopyFrom, 1) || isThatMethod(q.tm, n, t.KeyLength, 0) {
|
||||
foo := n.LHS().Expr().LHS().Expr()
|
||||
if err := q.tcheckExpr(foo, depth); err != nil {
|
||||
return err
|
||||
|
||||
Reference in new issue
Block a user