mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 17:08:38 +00:00
genbindings: more integer type handling
This commit is contained in:
parent
58eee48a5d
commit
0dce1b4fe2
@ -41,10 +41,8 @@ func (p CppParameter) RenderTypeGo() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch p.ParameterType {
|
switch p.ParameterType {
|
||||||
case "char", "qint8":
|
case "char", "qint8", "unsigned char", "uchar", "quint8":
|
||||||
ret += "byte"
|
ret += "byte" // Strictly speaking, Go byte is unsigned and char may be signed
|
||||||
case "unsigned char", "quint8":
|
|
||||||
ret += "byte"
|
|
||||||
case "short", "qint16":
|
case "short", "qint16":
|
||||||
ret += "int16"
|
ret += "int16"
|
||||||
case "ushort", "quint16":
|
case "ushort", "quint16":
|
||||||
@ -82,6 +80,12 @@ func (p CppParameter) RenderTypeGo() string {
|
|||||||
ret += "float32"
|
ret += "float32"
|
||||||
case "double":
|
case "double":
|
||||||
ret += "float64"
|
ret += "float64"
|
||||||
|
case "qsizetype":
|
||||||
|
if C.sizeof_size_t == 4 {
|
||||||
|
ret += "uint32"
|
||||||
|
} else {
|
||||||
|
ret += "uint64"
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
// Do not transform this type
|
// Do not transform this type
|
||||||
ret += p.ParameterType
|
ret += p.ParameterType
|
||||||
|
Loading…
Reference in New Issue
Block a user