fix(extgen): replace any by interface{} in the generated go file when dealing with handles

This commit is contained in:
Alexandre Daubois
2025-11-14 10:54:17 +01:00
committed by Kévin Dunglas
parent 724c0b11ca
commit 861b345b05

View File

@@ -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()
}