mirror of
https://github.com/mappu/miqt.git
synced 2025-01-03 06:08:38 +00:00
genbindings: more integer types
This commit is contained in:
parent
bdbeb3d1e5
commit
b5370c8728
@ -37,7 +37,7 @@ func (p CppParameter) RenderTypeCpp() string {
|
||||
ret = "size_t"
|
||||
case "qreal":
|
||||
ret = "double"
|
||||
case "qintptr":
|
||||
case "qintptr", "quintptr":
|
||||
ret = "uintptr_t"
|
||||
case "QRgb":
|
||||
ret = "unsigned int"
|
||||
|
@ -46,7 +46,7 @@ func (p CppParameter) RenderTypeGo() string {
|
||||
ret += "byte" // Strictly speaking, Go byte is unsigned and char may be signed
|
||||
case "short", "qint16":
|
||||
ret += "int16"
|
||||
case "ushort", "quint16":
|
||||
case "ushort", "quint16", "unsigned short":
|
||||
ret += "uint16"
|
||||
case "long":
|
||||
// Windows ILP32 - 32-bits
|
||||
@ -69,13 +69,15 @@ func (p CppParameter) RenderTypeGo() string {
|
||||
ret += "uint64"
|
||||
}
|
||||
|
||||
case "unsigned int":
|
||||
return "uint"
|
||||
case "qint32":
|
||||
ret += "int32"
|
||||
case "quint32":
|
||||
ret += "uint32"
|
||||
case "qlonglong", "qint64":
|
||||
case "qlonglong", "qint64", "long long":
|
||||
ret += "int64"
|
||||
case "qulonglong", "quint64":
|
||||
case "qulonglong", "quint64", "unsigned long long":
|
||||
ret += "uint64"
|
||||
case "float":
|
||||
ret += "float32"
|
||||
|
@ -86,6 +86,7 @@ func CheckComplexity(p CppParameter) error {
|
||||
"char *&", // e.g. QDataStream.operator<<()
|
||||
"qfloat16", // e.g. QDataStream - there is no such half-float type in C or Go
|
||||
"char16_t", // e.g. QChar() constructor overload, just unnecessary
|
||||
"char32_t", // e.g. QDebug().operator<< overload, unnecessary
|
||||
"picture_io_handler", // e.g. QPictureIO::DefineIOHandler callback function
|
||||
"QPlatformNativeInterface", // e.g. QGuiApplication::platformNativeInterface(). Private type, could probably expose as uintptr. n.b. Changes in Qt6
|
||||
"QFunctionPointer", // e.g. QGuiApplication_PlatformFunction
|
||||
|
Loading…
Reference in New Issue
Block a user