Skip to content

Commit 867ec21

Browse files
committed
Blob I/O: unabbreviate offs → offset
1 parent 2866235 commit 867ec21

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

blob_io.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ import (
2323

2424
// SQLiteBlob implements the SQLite Blob I/O interface.
2525
type SQLiteBlob struct {
26-
conn *SQLiteConn
27-
blob *C.sqlite3_blob
28-
size int
29-
offs int
26+
conn *SQLiteConn
27+
blob *C.sqlite3_blob
28+
size int
29+
offset int
3030
}
3131

3232
// Blob opens a blob.
@@ -61,22 +61,22 @@ func (conn *SQLiteConn) Blob(database, table, column string, rowid int64, flags
6161

6262
// Read implements the io.Reader interface.
6363
func (s *SQLiteBlob) Read(b []byte) (n int, err error) {
64-
if s.offs >= s.size {
64+
if s.offset >= s.size {
6565
return 0, io.EOF
6666
}
6767

68-
n = s.size - s.offs
68+
n = s.size - s.offset
6969
if len(b) < n {
7070
n = len(b)
7171
}
7272

7373
p := &b[0]
74-
ret := C.sqlite3_blob_read(s.blob, unsafe.Pointer(p), C.int(n), C.int(s.offs))
74+
ret := C.sqlite3_blob_read(s.blob, unsafe.Pointer(p), C.int(n), C.int(s.offset))
7575
if ret != C.SQLITE_OK {
7676
return 0, s.conn.lastError()
7777
}
7878

79-
s.offs += n
79+
s.offset += n
8080

8181
return n, nil
8282
}

0 commit comments

Comments
 (0)