Skip to content

Commit

Permalink
trying to get the handle to work
Browse files Browse the repository at this point in the history
  • Loading branch information
taniabogatsch committed Sep 11, 2024
1 parent 905bc5e commit f1d079a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scalar_udf.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ type ScalarFunction interface {
func scalar_udf_callback(info C.duckdb_function_info, input C.duckdb_data_chunk, output C.duckdb_vector) {
// info is a void* pointer to our ScalarFunction.
h := *(*cgo.Handle)(unsafe.Pointer(info))
// If we hardcoded h = 1 here, it no longer segfaults.
scalarFunction := h.Value().(ScalarFunction)

var err error
Expand Down

0 comments on commit f1d079a

Please sign in to comment.