Skip to content

Commit c2f8eb2

Browse files
author
JkLondon
committed
FD reviving
1 parent f8885bc commit c2f8eb2

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

mdbx/env.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,6 @@ func (env *Env) SetStrictThreadMode(mode bool) {
173173

174174
var errNotOpen = errors.New("enivornment is not open")
175175

176-
/* TODO: fix error: cannot convert *mf (variable of type _Ctype_HANDLE) to type uintptr
177-
178176
// FD returns the open file descriptor (or Windows file handle) for the given
179177
// environment. An error is returned if the environment has not been
180178
// successfully Opened (where C API just retruns an invalid handle).
@@ -199,7 +197,6 @@ func (env *Env) FD() (uintptr, error) {
199197
}
200198
return fd, nil
201199
}
202-
*/
203200

204201
// ReaderList dumps the contents of the reader lock table as text. Readers
205202
// start on the second line as space-delimited fields described by the first

mdbx/env_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ package mdbx
22

33
import (
44
"fmt"
5+
"runtime"
6+
"strings"
57
"testing"
68
)
79

@@ -99,12 +101,11 @@ func TestEnv_PreOpen(t *testing.T) {
99101

100102
}
101103

102-
/*
103104
func TestEnv_FD(t *testing.T) {
104105
if runtime.GOOS == "windows" {
105106
t.Skip("FD funcs not supported on windows")
106107
}
107-
env, err1 := NewEnv()
108+
env, err1 := NewEnv(Default)
108109
if err1 != nil {
109110
t.Error(err1)
110111
return
@@ -131,7 +132,6 @@ func TestEnv_FD(t *testing.T) {
131132
t.Errorf("fd: %x", fd)
132133
}
133134
}
134-
*/
135135

136136
func TestEnv_Flags(t *testing.T) {
137137
env, _ := setup(t)

0 commit comments

Comments
 (0)