From 31aec64e14e7d3cd199c52a5df26f8c85b66d28c Mon Sep 17 00:00:00 2001 From: canepat <16927169+canepat@users.noreply.github.com> Date: Sat, 7 Oct 2023 09:31:43 +0200 Subject: [PATCH] Expose C handle for MDBX enviroment on v0_27 (#119) --- mdbx/env.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mdbx/env.go b/mdbx/env.go index 61f11bd..a3df557 100644 --- a/mdbx/env.go +++ b/mdbx/env.go @@ -626,3 +626,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) +}