diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2014-03-21 13:21:33 -0600 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2014-03-21 13:21:33 -0600 |
commit | d2173f5f0ecbf4ed93c768e975435b04df3186ec (patch) | |
tree | ae6279c471e965b1ad14ac68a5621de00aad22b4 /syscall_darwin.go | |
parent | Merge pull request #68 from benbjohnson/remove-db-functions (diff) | |
download | dedo-d2173f5f0ecbf4ed93c768e975435b04df3186ec.tar.gz dedo-d2173f5f0ecbf4ed93c768e975435b04df3186ec.tar.xz |
Fix db.munmap() to return an error.
Changes munmap to return an error and the DB now implements io.Closer.
I also removed all the OS and Syscall mocking because it's causing issues.
Corrupt file tests need to be recreated but directly using the file system
instead.
Diffstat (limited to 'syscall_darwin.go')
-rw-r--r-- | syscall_darwin.go | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/syscall_darwin.go b/syscall_darwin.go deleted file mode 100644 index cb9a20c..0000000 --- a/syscall_darwin.go +++ /dev/null @@ -1,20 +0,0 @@ -package bolt - -import ( - "syscall" -) - -type _syscall interface { - Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) - Munmap([]byte) error -} - -type syssyscall struct{} - -func (o *syssyscall) Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) { - return syscall.Mmap(fd, offset, length, prot, flags) -} - -func (o *syssyscall) Munmap(b []byte) error { - return syscall.Munmap(b) -} |