Work around cgo (or Clang dwarf) bug with incorrect struct size

calculation by returning void pointers for NS object constructors.
Expand examples/app to start building menus.
This commit is contained in:
gmp
2019-05-07 14:48:06 -04:00
parent 511f2f1968
commit 8ed05fb451
4 changed files with 84 additions and 7 deletions
+28
View File
@@ -138,3 +138,31 @@ func (n *Node) _Ctype(ignore map[string]bool) string {
return s
}
func (n *Node) Qualifiers() string {
if n == nil {
return ""
}
ret := []string{}
for _,c := range n.Children {
switch c.Kind {
case "TypeQualifier":
ret = append(ret,c.Content)
}
}
return strings.Join(ret," ")
}
func (n *Node) Annotations() string {
if n == nil {
return ""
}
ret := []string{}
for _,c := range n.Children {
switch c.Kind {
case "NullableAnnotation":
ret = append(ret,c.Content)
}
}
return strings.Join(ret," ")
}