/*
 * Module code.
 *
 * Generated by SIP 6.15.3
 *
 * Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQtPurchasing.
 * 
 * This file may be used under the terms of the GNU General Public License
 * version 3.0 as published by the Free Software Foundation and appearing in
 * the file LICENSE included in the packaging of this file.  Please review the
 * following information to ensure the GNU General Public License version 3.0
 * requirements will be met: http://www.gnu.org/copyleft/gpl.html.
 * 
 * If you do not wish to use this file under the terms of the GPL version 3.0
 * then you may purchase a commercial license.  For more information contact
 * info@riverbankcomputing.com.
 * 
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "sipAPIQtPurchasing.h"

#line 28 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qobject.sip"
#include <qobject.h>
#line 29 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingcmodule.cpp"
#line 26 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qmetaobject.sip"
#include <qmetaobject.h>
#line 32 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingcmodule.cpp"
#line 26 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 35 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingcmodule.cpp"
#line 252 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 38 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingcmodule.cpp"
#line 240 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 41 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingcmodule.cpp"
#line 27 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qstring.sip"
#include <qstring.h>
#line 44 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingcmodule.cpp"
#line 26 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/sip/QtPurchasing/qinapptransaction.sip"
#include <qinapptransaction.h>
#line 47 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingcmodule.cpp"
#line 360 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qdatetime.sip"
#include <qdatetime.h>
#line 50 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingcmodule.cpp"
#line 26 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/sip/QtPurchasing/qinappstore.sip"
#include <qinappstore.h>
#line 53 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingcmodule.cpp"

/* Define the strings used by this module. */
const char sipStrings_QtPurchasing[] = {
    'Q', 'I', 'n', 'A', 'p', 'p', 'T', 'r', 'a', 'n', 's', 'a', 'c', 't', 'i', 'o', 'n', ':', ':', 'T', 'r', 'a', 'n', 's', 'a', 'c', 't', 'i', 'o', 'n', 'S', 't', 'a', 't', 'u', 's', 0,
    'Q', 'I', 'n', 'A', 'p', 'p', 'T', 'r', 'a', 'n', 's', 'a', 'c', 't', 'i', 'o', 'n', ':', ':', 'F', 'a', 'i', 'l', 'u', 'r', 'e', 'R', 'e', 'a', 's', 'o', 'n', 0,
    'P', 'Y', 'Q', 'T', '_', 'P', 'U', 'R', 'C', 'H', 'A', 'S', 'I', 'N', 'G', '_', 'V', 'E', 'R', 'S', 'I', 'O', 'N', '_', 'S', 'T', 'R', 0,
    'Q', 'I', 'n', 'A', 'p', 'p', 'P', 'r', 'o', 'd', 'u', 'c', 't', ':', ':', 'P', 'r', 'o', 'd', 'u', 'c', 't', 'T', 'y', 'p', 'e', 0,
    'Q', 'T', 'P', 'U', 'R', 'C', 'H', 'A', 'S', 'I', 'N', 'G', '_', 'V', 'E', 'R', 'S', 'I', 'O', 'N', '_', 'S', 'T', 'R', 0,
    'P', 'Y', 'Q', 'T', '_', 'P', 'U', 'R', 'C', 'H', 'A', 'S', 'I', 'N', 'G', '_', 'V', 'E', 'R', 'S', 'I', 'O', 'N', 0,
    'Q', 'T', 'P', 'U', 'R', 'C', 'H', 'A', 'S', 'I', 'N', 'G', '_', 'V', 'E', 'R', 'S', 'I', 'O', 'N', 0,
    's', 'e', 't', 'P', 'l', 'a', 't', 'f', 'o', 'r', 'm', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'y', 0,
    'P', 'y', 'Q', 't', '5', '.', 'Q', 't', 'P', 'u', 'r', 'c', 'h', 'a', 's', 'i', 'n', 'g', 0,
    'Q', 'I', 'n', 'A', 'p', 'p', 'T', 'r', 'a', 'n', 's', 'a', 'c', 't', 'i', 'o', 'n', 0,
    'p', 'r', 'o', 'd', 'u', 'c', 't', 'R', 'e', 'g', 'i', 's', 't', 'e', 'r', 'e', 'd', 0,
    'r', 'e', 'g', 'i', 's', 't', 'e', 'r', 'e', 'd', 'P', 'r', 'o', 'd', 'u', 'c', 't', 0,
    'P', 'u', 'r', 'c', 'h', 'a', 's', 'e', 'A', 'p', 'p', 'r', 'o', 'v', 'e', 'd', 0,
    'P', 'u', 'r', 'c', 'h', 'a', 's', 'e', 'R', 'e', 's', 't', 'o', 'r', 'e', 'd', 0,
    'd', 'i', 's', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'N', 'o', 't', 'i', 'f', 'y', 0,
    'p', 'l', 'a', 't', 'f', 'o', 'r', 'm', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'y', 0,
    'r', 'e', 's', 't', 'o', 'r', 'e', 'P', 'u', 'r', 'c', 'h', 'a', 's', 'e', 's', 0,
    't', 'r', 'a', 'n', 's', 'a', 'c', 't', 'i', 'o', 'n', 'R', 'e', 'a', 'd', 'y', 0,
    'r', 'e', 'g', 'i', 's', 't', 'e', 'r', 'P', 'r', 'o', 'd', 'u', 'c', 't', 0,
    'C', 'a', 'n', 'c', 'e', 'l', 'e', 'd', 'B', 'y', 'U', 's', 'e', 'r', 0,
    'P', 'u', 'r', 'c', 'h', 'a', 's', 'e', 'F', 'a', 'i', 'l', 'e', 'd', 0,
    'p', 'r', 'o', 'd', 'u', 'c', 't', 'U', 'n', 'k', 'n', 'o', 'w', 'n', 0,
    'E', 'r', 'r', 'o', 'r', 'O', 'c', 'c', 'u', 'r', 'r', 'e', 'd', 0,
    'Q', 'I', 'n', 'A', 'p', 'p', 'P', 'r', 'o', 'd', 'u', 'c', 't', 0,
    'f', 'a', 'i', 'l', 'u', 'r', 'e', 'R', 'e', 'a', 's', 'o', 'n', 0,
    'Q', 'I', 'n', 'A', 'p', 'p', 'S', 't', 'o', 'r', 'e', 0,
    'c', 'u', 's', 't', 'o', 'm', 'E', 'v', 'e', 'n', 't', 0,
    'd', 'e', 's', 'c', 'r', 'i', 'p', 't', 'i', 'o', 'n', 0,
    'e', 'r', 'r', 'o', 'r', 'S', 't', 'r', 'i', 'n', 'g', 0,
    'e', 'v', 'e', 'n', 't', 'F', 'i', 'l', 't', 'e', 'r', 0,
    'p', 'r', 'o', 'd', 'u', 'c', 't', 'T', 'y', 'p', 'e', 0,
    'C', 'o', 'n', 's', 'u', 'm', 'a', 'b', 'l', 'e', 0,
    'U', 'n', 'l', 'o', 'c', 'k', 'a', 'b', 'l', 'e', 0,
    'c', 'h', 'i', 'l', 'd', 'E', 'v', 'e', 'n', 't', 0,
    'i', 'd', 'e', 'n', 't', 'i', 'f', 'i', 'e', 'r', 0,
    't', 'i', 'm', 'e', 'r', 'E', 'v', 'e', 'n', 't', 0,
    'N', 'o', 'F', 'a', 'i', 'l', 'u', 'r', 'e', 0,
    't', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', 0,
    'f', 'i', 'n', 'a', 'l', 'i', 'z', 'e', 0,
    'p', 'u', 'r', 'c', 'h', 'a', 's', 'e', 0,
    'o', 'r', 'd', 'e', 'r', 'I', 'd', 0,
    'p', 'r', 'o', 'd', 'u', 'c', 't', 0,
    'p', 'a', 'r', 'e', 'n', 't', 0,
    's', 't', 'a', 't', 'u', 's', 0,
    'e', 'v', 'e', 'n', 't', 0,
    'p', 'r', 'i', 'c', 'e', 0,
    't', 'i', 't', 'l', 'e', 0,
};
#line 30 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/sip/QtPurchasing/qtpurchasingversion.sip"
static int PYQT_PURCHASING_VERSION = 0x050f06;
static const char *PYQT_PURCHASING_VERSION_STR = "5.15.6";
#line 35 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/sip/QtPurchasing/qtpurchasingversion.sip"
#include <qtpurchasingversion.h>
#line 110 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingcmodule.cpp"

::QString sipVH_QtPurchasing_10(sip_gilstate_t sipGILState, sipVirtErrorHandlerFunc sipErrorHandler, sipSimpleWrapper *sipPySelf, PyObject *sipMethod, const ::QString& a0)
{
    ::QString sipRes;
    PyObject *sipResObj = sipCallMethod(SIP_NULLPTR, sipMethod, "N", new ::QString(a0), sipType_QString, SIP_NULLPTR);

    sipParseResultEx(sipGILState, sipErrorHandler, sipPySelf, sipMethod, sipResObj, "H5", sipType_QString, &sipRes);

    return sipRes;
}

::QDateTime sipVH_QtPurchasing_9(sip_gilstate_t sipGILState, sipVirtErrorHandlerFunc sipErrorHandler, sipSimpleWrapper *sipPySelf, PyObject *sipMethod)
{
    ::QDateTime sipRes;
    PyObject *sipResObj = sipCallMethod(SIP_NULLPTR, sipMethod, "");

    sipParseResultEx(sipGILState, sipErrorHandler, sipPySelf, sipMethod, sipResObj, "H5", sipType_QDateTime, &sipRes);

    return sipRes;
}

::QInAppTransaction::FailureReason sipVH_QtPurchasing_8(sip_gilstate_t sipGILState, sipVirtErrorHandlerFunc sipErrorHandler, sipSimpleWrapper *sipPySelf, PyObject *sipMethod)
{
    ::QInAppTransaction::FailureReason sipRes = ::QInAppTransaction::NoFailure;
    PyObject *sipResObj = sipCallMethod(SIP_NULLPTR, sipMethod, "");

    sipParseResultEx(sipGILState, sipErrorHandler, sipPySelf, sipMethod, sipResObj, "F", sipType_QInAppTransaction_FailureReason, &sipRes);

    return sipRes;
}

::QString sipVH_QtPurchasing_7(sip_gilstate_t sipGILState, sipVirtErrorHandlerFunc sipErrorHandler, sipSimpleWrapper *sipPySelf, PyObject *sipMethod)
{
    ::QString sipRes;
    PyObject *sipResObj = sipCallMethod(SIP_NULLPTR, sipMethod, "");

    sipParseResultEx(sipGILState, sipErrorHandler, sipPySelf, sipMethod, sipResObj, "H5", sipType_QString, &sipRes);

    return sipRes;
}

void sipVH_QtPurchasing_6(sip_gilstate_t sipGILState, sipVirtErrorHandlerFunc sipErrorHandler, sipSimpleWrapper *sipPySelf, PyObject *sipMethod)
{
    sipCallProcedureMethod(sipGILState, sipErrorHandler, sipPySelf, sipMethod, "");
}

bool sipVH_QtPurchasing_5(sip_gilstate_t sipGILState, sipVirtErrorHandlerFunc sipErrorHandler, sipSimpleWrapper *sipPySelf, PyObject *sipMethod, ::QEvent*a0)
{
    bool sipRes = 0;
    PyObject *sipResObj = sipCallMethod(SIP_NULLPTR, sipMethod, "D", a0, sipType_QEvent, SIP_NULLPTR);

    sipParseResultEx(sipGILState, sipErrorHandler, sipPySelf, sipMethod, sipResObj, "b", &sipRes);

    return sipRes;
}

bool sipVH_QtPurchasing_4(sip_gilstate_t sipGILState, sipVirtErrorHandlerFunc sipErrorHandler, sipSimpleWrapper *sipPySelf, PyObject *sipMethod, ::QObject*a0, ::QEvent*a1)
{
    bool sipRes = 0;
    PyObject *sipResObj = sipCallMethod(SIP_NULLPTR, sipMethod, "DD", a0, sipType_QObject, SIP_NULLPTR, a1, sipType_QEvent, SIP_NULLPTR);

    sipParseResultEx(sipGILState, sipErrorHandler, sipPySelf, sipMethod, sipResObj, "b", &sipRes);

    return sipRes;
}

void sipVH_QtPurchasing_3(sip_gilstate_t sipGILState, sipVirtErrorHandlerFunc sipErrorHandler, sipSimpleWrapper *sipPySelf, PyObject *sipMethod, ::QTimerEvent*a0)
{
    sipCallProcedureMethod(sipGILState, sipErrorHandler, sipPySelf, sipMethod, "D", a0, sipType_QTimerEvent, SIP_NULLPTR);
}

void sipVH_QtPurchasing_2(sip_gilstate_t sipGILState, sipVirtErrorHandlerFunc sipErrorHandler, sipSimpleWrapper *sipPySelf, PyObject *sipMethod, ::QChildEvent*a0)
{
    sipCallProcedureMethod(sipGILState, sipErrorHandler, sipPySelf, sipMethod, "D", a0, sipType_QChildEvent, SIP_NULLPTR);
}

void sipVH_QtPurchasing_1(sip_gilstate_t sipGILState, sipVirtErrorHandlerFunc sipErrorHandler, sipSimpleWrapper *sipPySelf, PyObject *sipMethod, ::QEvent*a0)
{
    sipCallProcedureMethod(sipGILState, sipErrorHandler, sipPySelf, sipMethod, "D", a0, sipType_QEvent, SIP_NULLPTR);
}

void sipVH_QtPurchasing_0(sip_gilstate_t sipGILState, sipVirtErrorHandlerFunc sipErrorHandler, sipSimpleWrapper *sipPySelf, PyObject *sipMethod, const ::QMetaMethod& a0)
{
    sipCallProcedureMethod(sipGILState, sipErrorHandler, sipPySelf, sipMethod, "N", new ::QMetaMethod(a0), sipType_QMetaMethod, SIP_NULLPTR);
}


/* Convert to a sub-class if possible. */
extern "C" {static const sipTypeDef *sipSubClass_QInAppStore(void **);}
static const sipTypeDef *sipSubClass_QInAppStore(void **sipCppRet)
{
    ::QObject *sipCpp = reinterpret_cast< ::QObject *>(*sipCppRet);
    const sipTypeDef *sipType;

#line 30 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/sip/QtPurchasing/qinappstore.sip"
    static struct class_graph {
        const char *name;
        sipTypeDef **type;
        int yes, no;
    } graph[] = {
        {sipName_QInAppProduct, &sipType_QInAppProduct, -1, 1},
        {sipName_QInAppStore, &sipType_QInAppStore, -1, 2},
        {sipName_QInAppTransaction, &sipType_QInAppTransaction, -1, -1},
    };
    
    int i = 0;
    
    sipType = NULL;
    
    do
    {
        struct class_graph *cg = &graph[i];
    
        if (cg->name != NULL && sipCpp->inherits(cg->name))
        {
            sipType = *cg->type;
            i = cg->yes;
        }
        else
            i = cg->no;
    }
    while (i >= 0);
#line 233 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingcmodule.cpp"

    return sipType;
}
static sipEnumTypeDef enumTypes[] = {
    {{-1, SIP_NULLPTR, SIP_NULLPTR, SIP_TYPE_ENUM, sipNameNr_QInAppProduct__ProductType, SIP_NULLPTR, 0}, sipNameNr_ProductType, 0, SIP_NULLPTR},
    {{-1, SIP_NULLPTR, SIP_NULLPTR, SIP_TYPE_ENUM, sipNameNr_QInAppTransaction__FailureReason, SIP_NULLPTR, 0}, sipNameNr_FailureReason, 3, SIP_NULLPTR},
    {{-1, SIP_NULLPTR, SIP_NULLPTR, SIP_TYPE_ENUM, sipNameNr_QInAppTransaction__TransactionStatus, SIP_NULLPTR, 0}, sipNameNr_TransactionStatus, 3, SIP_NULLPTR},
};


/*
 * This defines each type in this module.
 */
sipTypeDef *sipExportedTypes_QtPurchasing[] = {
    &sipTypeDef_QtPurchasing_QInAppProduct.ctd_base,
    &enumTypes[0].etd_base,
    &sipTypeDef_QtPurchasing_QInAppStore.ctd_base,
    &sipTypeDef_QtPurchasing_QInAppTransaction.ctd_base,
    &enumTypes[1].etd_base,
    &enumTypes[2].etd_base,
};


/* This defines the types that this module needs to import from QtCore. */
sipImportedTypeDef sipImportedTypes_QtPurchasing_QtCore[] = {
    {"QChildEvent"},
    {"QDateTime"},
    {"QEvent"},
    {"QMetaMethod"},
    {"QObject"},
    {"QString"},
    {"QTimerEvent"},
    {SIP_NULLPTR}
};


/*
 * This defines the virtual error handlers that this module needs to import
 * from QtCore.
 */
sipImportedVirtErrorHandlerDef sipImportedVirtErrorHandlers_QtPurchasing_QtCore[] = {
    {"PyQt5"},
    {SIP_NULLPTR}
};


/* This defines the modules that this module needs to import. */
static sipImportedModuleDef importsTable[] = {
    {"PyQt5.QtCore", sipImportedTypes_QtPurchasing_QtCore, sipImportedVirtErrorHandlers_QtPurchasing_QtCore, SIP_NULLPTR},
    {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR}
};


/* This defines the class sub-convertors that this module defines. */
static sipSubClassConvertorDef convertorsTable[] = {
    {sipSubClass_QInAppStore, {4, 0, 0}, SIP_NULLPTR},
    {SIP_NULLPTR, {0, 0, 0}, SIP_NULLPTR}
};


/* Define the strings to be added to this module dictionary. */
static sipStringInstanceDef stringInstances[] = {
    {sipName_PYQT_PURCHASING_VERSION_STR, PYQT_PURCHASING_VERSION_STR, 'A'},
    {sipName_QTPURCHASING_VERSION_STR, QTPURCHASING_VERSION_STR, 'A'},
    {0, 0, 0}
};


/* Define the enum members and ints to be added to this module. */
static sipIntInstanceDef intInstances[] = {
    {sipName_PYQT_PURCHASING_VERSION, PYQT_PURCHASING_VERSION},
    {sipName_QTPURCHASING_VERSION, QTPURCHASING_VERSION},
    {0, 0}
};


/* This defines this module. */
sipExportedModuleDef sipModuleAPI_QtPurchasing = {
    SIP_NULLPTR,
    15,
    sipNameNr_PyQt5_QtPurchasing,
    0,
    sipStrings_QtPurchasing,
    importsTable,
    SIP_NULLPTR,
    6,
    sipExportedTypes_QtPurchasing,
    SIP_NULLPTR,
    0,
    SIP_NULLPTR,
    0,
    SIP_NULLPTR,
    SIP_NULLPTR,
    convertorsTable,
    {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, stringInstances, intInstances, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
};


/* The SIP API and the APIs of any imported modules. */
const sipAPIDef *sipAPI_QtPurchasing;

sip_qt_metaobject_func sip_QtPurchasing_qt_metaobject;
sip_qt_metacall_func sip_QtPurchasing_qt_metacall;
sip_qt_metacast_func sip_QtPurchasing_qt_metacast;


/* The Python module initialisation function. */
#if defined(SIP_STATIC_MODULE)
extern "C" PyObject *PyInit_QtPurchasing()
#else
PyMODINIT_FUNC PyInit_QtPurchasing()
#endif
{
    static PyMethodDef sip_methods[] = {
        {SIP_NULLPTR, SIP_NULLPTR, 0, SIP_NULLPTR}
    };
    static PyModuleDef sip_module_def = {
        PyModuleDef_HEAD_INIT,
        "PyQt5.QtPurchasing",
        SIP_NULLPTR,
        -1,
        sip_methods,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_NULLPTR
    };

    PyObject *sipModule, *sipModuleDict;
    PyObject *sip_sipmod, *sip_capiobj;

    /* Initialise the module and get it's dictionary. */
    if ((sipModule = PyModule_Create(&sip_module_def)) == SIP_NULLPTR)
        return SIP_NULLPTR;

    sipModuleDict = PyModule_GetDict(sipModule);

    /* Get the SIP module's API. */
    if ((sip_sipmod = PyImport_ImportModule("PyQt5.sip")) == SIP_NULLPTR)
    {
        Py_DECREF(sipModule);
        return SIP_NULLPTR;
    }

    sip_capiobj = PyDict_GetItemString(PyModule_GetDict(sip_sipmod), "_C_API");
    Py_DECREF(sip_sipmod);

    if (sip_capiobj == SIP_NULLPTR || !PyCapsule_CheckExact(sip_capiobj))
    {
        PyErr_SetString(PyExc_AttributeError, "PyQt5.sip._C_API is missing or has the wrong type");
        Py_DECREF(sipModule);
        return SIP_NULLPTR;
    }

    sipAPI_QtPurchasing = reinterpret_cast<const sipAPIDef *>(PyCapsule_GetPointer(sip_capiobj, "PyQt5.sip._C_API"));

    if (sipAPI_QtPurchasing == SIP_NULLPTR)
    {
        Py_DECREF(sipModule);
        return SIP_NULLPTR;
    }

    /* Export the module and publish it's API. */
    if (sipExportModule(&sipModuleAPI_QtPurchasing, 12, 15, 0) < 0)
    {
        Py_DECREF(sipModule);
        return SIP_NULLPTR;
    }


    sip_QtPurchasing_qt_metaobject = (sip_qt_metaobject_func)sipImportSymbol("qtcore_qt_metaobject");
    sip_QtPurchasing_qt_metacall = (sip_qt_metacall_func)sipImportSymbol("qtcore_qt_metacall");
    sip_QtPurchasing_qt_metacast = (sip_qt_metacast_func)sipImportSymbol("qtcore_qt_metacast");

    if (!sip_QtPurchasing_qt_metacast)
        Py_FatalError("Unable to import qtcore_qt_metacast");

    /* Initialise the module now all its dependencies have been set up. */
    if (sipInitModule(&sipModuleAPI_QtPurchasing, sipModuleDict) < 0)
    {
        Py_DECREF(sipModule);
        return SIP_NULLPTR;
    }

    return sipModule;
}
