mirror of
https://github.com/mappu/miqt.git
synced 2025-01-20 21:50:38 +00:00
a0c6344ecd
The expected type of the callback is already known from the AST - this change reduces dependency on cgo specifics and makes the generated C ABI entirely cgo-independent - in particular, there is no need to include `_cgo_export.h` any more.
52 lines
893 B
C++
52 lines
893 B
C++
#include <qfloat16.h>
|
|
#include "gen_qfloat16.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
} /* extern C */
|
|
#endif
|
|
|
|
qfloat16* qfloat16_new() {
|
|
return new qfloat16();
|
|
}
|
|
|
|
qfloat16* qfloat16_new2(int param1) {
|
|
return new qfloat16(static_cast<Qt::Initialization>(param1));
|
|
}
|
|
|
|
qfloat16* qfloat16_new3(float f) {
|
|
return new qfloat16(static_cast<float>(f));
|
|
}
|
|
|
|
bool qfloat16_IsInf(const qfloat16* self) {
|
|
return self->isInf();
|
|
}
|
|
|
|
bool qfloat16_IsNaN(const qfloat16* self) {
|
|
return self->isNaN();
|
|
}
|
|
|
|
bool qfloat16_IsFinite(const qfloat16* self) {
|
|
return self->isFinite();
|
|
}
|
|
|
|
int qfloat16_FpClassify(const qfloat16* self) {
|
|
return self->fpClassify();
|
|
}
|
|
|
|
bool qfloat16_IsNormal(const qfloat16* self) {
|
|
return self->isNormal();
|
|
}
|
|
|
|
void qfloat16_Delete(qfloat16* self, bool isSubclass) {
|
|
if (isSubclass) {
|
|
delete dynamic_cast<qfloat16*>( self );
|
|
} else {
|
|
delete self;
|
|
}
|
|
}
|
|
|