miqt/qt6/gen_qcontiguouscache.cpp
Jacek Sieka a0c6344ecd Avoid dependency on exported go header
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.
2025-01-07 12:55:40 +01:00

29 lines
657 B
C++

#include <QContiguousCacheData>
#include <qcontiguouscache.h>
#include "gen_qcontiguouscache.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
} /* extern C */
#endif
QContiguousCacheData* QContiguousCacheData_AllocateData(ptrdiff_t size, ptrdiff_t alignment) {
return QContiguousCacheData::allocateData((qsizetype)(size), (qsizetype)(alignment));
}
void QContiguousCacheData_FreeData(QContiguousCacheData* data) {
QContiguousCacheData::freeData(data);
}
void QContiguousCacheData_Delete(QContiguousCacheData* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QContiguousCacheData*>( self );
} else {
delete self;
}
}