From 861b345b056fd9422d66b6a604e12df2eeece3e3 Mon Sep 17 00:00:00 2001 From: Alexandre Daubois Date: Fri, 14 Nov 2025 10:54:17 +0100 Subject: [PATCH] fix(extgen): replace `any` by `interface{}` in the generated go file when dealing with handles --- internal/extgen/templates/extension.go.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/extgen/templates/extension.go.tpl b/internal/extgen/templates/extension.go.tpl index ed0e0854..dc65b2fb 100644 --- a/internal/extgen/templates/extension.go.tpl +++ b/internal/extgen/templates/extension.go.tpl @@ -43,13 +43,13 @@ type {{.GoStruct}} struct { {{- end}} {{- if .Classes}} //export registerGoObject -func registerGoObject(obj any) C.uintptr_t { +func registerGoObject(obj interface{}) C.uintptr_t { handle := cgo.NewHandle(obj) return C.uintptr_t(handle) } //export getGoObject -func getGoObject(handle C.uintptr_t) any { +func getGoObject(handle C.uintptr_t) interface{} { h := cgo.Handle(handle) return h.Value() }