/*
 * Composite module code.
 *
 * Generated by SIP 6.8.6
 */


#if !defined(Py_LIMITED_API)
#define Py_LIMITED_API
#endif

#include "sip.h"


static void sip_import_component_module(PyObject *d, const char *name)
{
    PyObject *mod;

    PyErr_Clear();

    mod = PyImport_ImportModule(name);

    /*
     * Note that we don't complain if the module can't be imported.  This
     * is a favour to Linux distro packagers who like to split PyQt into
     * different sub-packages.
     */
    if (mod)
    {
        PyDict_Merge(d, PyModule_GetDict(mod), 0);
        Py_DECREF(mod);
    }
}


/* The Python module initialisation function. */
#if defined(SIP_STATIC_MODULE)
PyObject *PyInit_Qt(void)
#else
PyMODINIT_FUNC PyInit_Qt(void)
#endif
{
    static PyModuleDef sip_module_def = {
        PyModuleDef_HEAD_INIT,
        "PyQt5.Qt",
        SIP_NULLPTR,
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_NULLPTR
    };

    PyObject *sipModule, *sipModuleDict;

    if ((sipModule = PyModule_Create(&sip_module_def)) == SIP_NULLPTR)
        return SIP_NULLPTR;

    sipModuleDict = PyModule_GetDict(sipModule);

    sip_import_component_module(sipModuleDict, "PyQt5.QtXml");
    sip_import_component_module(sipModuleDict, "PyQt5.QtSvg");
    sip_import_component_module(sipModuleDict, "PyQt5.QtQuickWidgets");
    sip_import_component_module(sipModuleDict, "PyQt5.QtQuick");
    sip_import_component_module(sipModuleDict, "PyQt5.QtQml");
    sip_import_component_module(sipModuleDict, "PyQt5.QtWidgets");
    sip_import_component_module(sipModuleDict, "PyQt5.QtGui");
    sip_import_component_module(sipModuleDict, "PyQt5.QtNetwork");
    sip_import_component_module(sipModuleDict, "PyQt5.QtCore");

    PyErr_Clear();

    return sipModule;
}
