mirror of
https://github.com/mappu/miqt.git
synced 2025-01-21 22:20: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.
45 lines
821 B
C++
45 lines
821 B
C++
#include <QHashSeed>
|
|
#include <qhashfunctions.h>
|
|
#include "gen_qhashfunctions.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
} /* extern C */
|
|
#endif
|
|
|
|
QHashSeed* QHashSeed_new() {
|
|
return new QHashSeed();
|
|
}
|
|
|
|
QHashSeed* QHashSeed_new2(size_t d) {
|
|
return new QHashSeed(static_cast<size_t>(d));
|
|
}
|
|
|
|
size_t QHashSeed_ToUnsignedLong(const QHashSeed* self) {
|
|
return self->operator unsigned long();
|
|
}
|
|
|
|
QHashSeed* QHashSeed_GlobalSeed() {
|
|
return new QHashSeed(QHashSeed::globalSeed());
|
|
}
|
|
|
|
void QHashSeed_SetDeterministicGlobalSeed() {
|
|
QHashSeed::setDeterministicGlobalSeed();
|
|
}
|
|
|
|
void QHashSeed_ResetRandomGlobalSeed() {
|
|
QHashSeed::resetRandomGlobalSeed();
|
|
}
|
|
|
|
void QHashSeed_Delete(QHashSeed* self, bool isSubclass) {
|
|
if (isSubclass) {
|
|
delete dynamic_cast<QHashSeed*>( self );
|
|
} else {
|
|
delete self;
|
|
}
|
|
}
|
|
|