MCPcopy Create free account
hub / github.com/despiteallobjections/amigo / isStructUnionClass

Function isStructUnionClass

cgotool/gcc.go:2742–2751  ·  view source on GitHub ↗

isStructUnionClass reports whether the type described by the Go syntax x is a struct, union, or class with a tag.

(x ast.Expr)

Source from the content-addressed store, hash-verified

2740// isStructUnionClass reports whether the type described by the Go syntax x
2741// is a struct, union, or class with a tag.
2742func isStructUnionClass(x ast.Expr) bool {
2743 id, ok := x.(*ast.Ident)
2744 if !ok {
2745 return false
2746 }
2747 name := id.Name
2748 return strings.HasPrefix(name, "_Ctype_struct_") ||
2749 strings.HasPrefix(name, "_Ctype_union_") ||
2750 strings.HasPrefix(name, "_Ctype_class_")
2751}
2752
2753// FuncArg returns a Go type with the same memory layout as
2754// dtype when used as the type of a C function argument.

Callers 2

loadTypeMethod · 0.85
FuncArgMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected