Skip to content

Commit

Permalink
Fix build for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
tdewolff committed Oct 11, 2024
1 parent b29e7a9 commit 3b60447
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 0 additions & 8 deletions binary.go
Original file line number Diff line number Diff line change
Expand Up @@ -510,14 +510,6 @@ func NewBinaryReader2File(filename string) (*BinaryReader2, error) {
return NewBinaryReader2(f), nil
}

func NewBinaryReader2Mmap(filename string) (*BinaryReader2, error) {
f, err := newBinaryReaderMmap(filename)
if err != nil {
return nil, err
}
return NewBinaryReader2(f), nil
}

func (r *BinaryReader2) Err() error {
return r.err
}
Expand Down
8 changes: 8 additions & 0 deletions binary_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,11 @@ func (r *binaryReaderMmap) Bytes(n int, off int64) ([]byte, error) {
}
return r.data[off : off+int64(n) : off+int64(n)], nil
}

func NewBinaryReader2Mmap(filename string) (*BinaryReader2, error) {
f, err := newBinaryReaderMmap(filename)
if err != nil {
return nil, err
}
return NewBinaryReader2(f), nil
}

0 comments on commit 3b60447

Please sign in to comment.