Skip to content

Commit 48b0af9

Browse files
author
JkLondon
committed
Add cgo directives for cursor and txn, update Go version to 1.24
1 parent 3d3028c commit 48b0af9

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module github.com/erigontech/mdbx-go
22

3-
go 1.20
3+
go 1.24
44

55
require github.com/ianlancetaylor/cgosymbolizer v0.0.0-20241129212102-9c50ad6b591e

mdbx/cursor.go

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
package mdbx
22

3-
/*
4-
#include <stdlib.h>
5-
#include <stdio.h>
6-
#include "mdbxgo.h"
7-
*/
83
import "C"
94
import (
105
"fmt"
116
"sync"
127
"unsafe"
138
)
149

10+
/*
11+
#cgo nocallback mdbxgo_cursor_get
12+
#cgo noescape mdbxgo_cursor_get
13+
#include <stdlib.h>
14+
#include <stdio.h>
15+
#include "mdbxgo.h"
16+
*/
17+
import "C"
18+
1519
const (
1620
// Flags for Cursor.Get
1721
//

mdbx/txn.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
package mdbx
22

33
/*
4+
#cgo nocallback mdbxgo_get
5+
#cgo noescape mdbxgo_get
6+
#cgo nocallback mdbxgo_put2
7+
#cgo noescape mdbxgo_put2
8+
#cgo nocallback mdbxgo_put1
9+
#cgo noescape mdbxgo_put1
410
#include <stdlib.h>
511
#include <stdio.h>
612
#include "mdbxgo.h"

0 commit comments

Comments
 (0)