genbindings/go: fix for classes inheriting namespaced/inner classes

This commit is contained in:
mappu 2024-10-08 17:37:13 +13:00
parent 8d8d802029
commit fc7aeecabf
1 changed files with 2 additions and 2 deletions

View File

@ -471,7 +471,7 @@ import "C"
// Embed all inherited types to directly allow calling inherited methods // Embed all inherited types to directly allow calling inherited methods
for _, base := range c.Inherits { for _, base := range c.Inherits {
ret.WriteString("*" + base + "\n") ret.WriteString("*" + cabiClassName(base) + "\n")
} }
ret.WriteString(` ret.WriteString(`
@ -489,7 +489,7 @@ import "C"
localInit := "h: h" localInit := "h: h"
for _, base := range c.Inherits { for _, base := range c.Inherits {
gfs.imports["unsafe"] = struct{}{} gfs.imports["unsafe"] = struct{}{}
localInit += ", " + base + ": new" + cabiClassName(base) + "_U(unsafe.Pointer(h))" localInit += ", " + cabiClassName(base) + ": new" + cabiClassName(base) + "_U(unsafe.Pointer(h))"
} }
ret.WriteString(` ret.WriteString(`