diff --git a/cmd/genbindings/emitcabi.go b/cmd/genbindings/emitcabi.go index c6b94800..f06705e9 100644 --- a/cmd/genbindings/emitcabi.go +++ b/cmd/genbindings/emitcabi.go @@ -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" diff --git a/cmd/genbindings/emitgo.go b/cmd/genbindings/emitgo.go index 77b75515..e3a3a983 100644 --- a/cmd/genbindings/emitgo.go +++ b/cmd/genbindings/emitgo.go @@ -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" diff --git a/cmd/genbindings/exceptions.go b/cmd/genbindings/exceptions.go index 89a5752a..5afa4072 100644 --- a/cmd/genbindings/exceptions.go +++ b/cmd/genbindings/exceptions.go @@ -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