Fix handling of signed, unsigned, complex, and long long types

in Go type declarations.
This commit is contained in:
Greg 2019-04-26 14:15:18 -04:00
parent 4f260dda0e
commit b93ba4c01f
1 changed files with 4 additions and 3 deletions

View File

@ -87,10 +87,11 @@ func swapstars(s string) string {
func (t *Type) CGoType() string {
ct := swapstars("C." + t.CType())
ct = strings.ReplaceAll(ct,"unsigned ","u")
ct = strings.ReplaceAll(ct,"signed ","u")
ct = strings.ReplaceAll(ct,"long ","long")
ct = strings.ReplaceAll(ct,"complex ","complex")
ct = strings.ReplaceAll(ct," ","_")
if ct == "C.long_long" {
ct = "C.long" // FIXME why?
}
return ct
}