From ea6ad788fd716dd1b22e3fb9e5ca187a5e16a3d0 Mon Sep 17 00:00:00 2001 From: canepat <16927169+canepat@users.noreply.github.com> Date: Fri, 6 Oct 2023 13:18:15 +0200 Subject: [PATCH] Expose C handle for MDBX environment --- mdbx/env.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mdbx/env.go b/mdbx/env.go index 1b894b1..42860c1 100644 --- a/mdbx/env.go +++ b/mdbx/env.go @@ -618,3 +618,7 @@ func (env *Env) run(lock bool, flags uint, fn TxnOp) error { func (env *Env) CloseDBI(db DBI) { C.mdbx_dbi_close(env._env, C.MDBX_dbi(db)) } + +func (env *Env) CHandle() unsafe.Pointer { + return unsafe.Pointer(env._env) +}