genbindings/state: track class lookup locations

This commit is contained in:
mappu 2024-11-11 18:26:14 +13:00
parent ed18c216f3
commit d9bfece505
2 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@ import (
type lookupResultClass struct {
PackageName string
Class CppClass
}
type lookupResultTypedef struct {

View File

@ -165,7 +165,7 @@ func generate(packageName string, srcDirs []string, allowHeaderFn func(string) b
// Update global state tracker (AFTER astTransformChildClasses)
for _, c := range parsed.Classes {
KnownClassnames[c.ClassName] = lookupResultClass{packageName}
KnownClassnames[c.ClassName] = lookupResultClass{packageName, c /* copy */}
}
for _, td := range parsed.Typedefs {
KnownTypedefs[td.Alias] = lookupResultTypedef{packageName, td /* copy */}