mirror of
https://github.com/mappu/miqt.git
synced 2024-12-23 01:18:37 +00:00
genbindings/cabi: replace qt int types with native C types in C header
This commit is contained in:
parent
3dcdfbd594
commit
8ac598fbb5
@ -8,9 +8,23 @@ import (
|
|||||||
|
|
||||||
func (p CppParameter) RenderTypeCpp() string {
|
func (p CppParameter) RenderTypeCpp() string {
|
||||||
ret := p.ParameterType
|
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 {
|
if p.Pointer || p.ByRef {
|
||||||
ret += "*"
|
ret += "*"
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret // ignore const
|
return ret // ignore const
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user