mirror of
https://github.com/dunglas/frankenphp.git
synced 2025-12-24 13:38:11 +08:00
fix(extgen): replace any by interface{} in the generated go file when dealing with handles
This commit is contained in:
committed by
Kévin Dunglas
parent
724c0b11ca
commit
861b345b05
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user