mirror of
https://github.com/mappu/miqt.git
synced 2025-01-21 22:20:38 +00:00
genbindings: fixes for qintptr
This commit is contained in:
parent
33b26204f8
commit
b3d55cc17f
@ -6,6 +6,7 @@ import (
|
||||
"log"
|
||||
"sort"
|
||||
"strings"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
func goReservedWord(s string) bool {
|
||||
@ -86,6 +87,13 @@ func (p CppParameter) RenderTypeGo() string {
|
||||
} else {
|
||||
ret += "uint64"
|
||||
}
|
||||
case "qintptr":
|
||||
var ptr *int
|
||||
if unsafe.Sizeof(ptr) == 8 {
|
||||
ret += "uint64"
|
||||
} else {
|
||||
ret += "uint32"
|
||||
}
|
||||
default:
|
||||
// Do not transform this type
|
||||
ret += p.ParameterType
|
||||
|
@ -48,6 +48,7 @@ func (p CppParameter) IntType() bool {
|
||||
"long", "unsigned long", "ulong", "qint32", "quint32",
|
||||
"longlong", "ulonglong", "qlonglong", "qulonglong", "qint64", "quint64", "int64_t", "uint64_t", "long long", "unsigned long long",
|
||||
"QRgb", // unsigned int
|
||||
"qintptr",
|
||||
"double", "float", "qreal":
|
||||
return true
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user