Fix handling of signed, unsigned, complex, and long long types
in Go type declarations.
This commit is contained in:
parent
4f260dda0e
commit
b93ba4c01f
|
@ -87,10 +87,11 @@ func swapstars(s string) string {
|
||||||
|
|
||||||
func (t *Type) CGoType() string {
|
func (t *Type) CGoType() string {
|
||||||
ct := swapstars("C." + t.CType())
|
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," ","_")
|
ct = strings.ReplaceAll(ct," ","_")
|
||||||
if ct == "C.long_long" {
|
|
||||||
ct = "C.long" // FIXME why?
|
|
||||||
}
|
|
||||||
return ct
|
return ct
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user