From 8ac598fbb52474f600650c922fcdf079699743e7 Mon Sep 17 00:00:00 2001 From: mappu Date: Wed, 14 Aug 2024 18:34:05 +1200 Subject: [PATCH] genbindings/cabi: replace qt int types with native C types in C header --- cmd/genbindings/emitcabi.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/cmd/genbindings/emitcabi.go b/cmd/genbindings/emitcabi.go index 3a26defc..1d0a2381 100644 --- a/cmd/genbindings/emitcabi.go +++ b/cmd/genbindings/emitcabi.go @@ -8,9 +8,23 @@ import ( func (p CppParameter) RenderTypeCpp() string { ret := p.ParameterType + switch p.ParameterType { + case "uint": + ret = "unsigned int" + case "ushort": + ret = "unsigned short" + case "ulong": + ret = "unsigned long" + case "qlonglong": + ret = "int64_t" + case "qulonglong": + ret = "uint64_t" + } + if p.Pointer || p.ByRef { ret += "*" } + return ret // ignore const }