/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.15.3
 *
 * Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt5.
 * 
 * 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 "sipAPIQtCore.h"

#line 24 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qpycore_qvariantmap.sip"
#include <qvariant.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.11/build/QtCore/sipQtCoreQVariantMap.cpp"



extern "C" {static void assign_QVariantMap(void *, Py_ssize_t, void *);}
static void assign_QVariantMap(void *sipDst, Py_ssize_t sipDstIdx, void *sipSrc)
{
    reinterpret_cast< ::QVariantMap *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::QVariantMap *>(sipSrc);
}


extern "C" {static void *array_QVariantMap(Py_ssize_t);}
static void *array_QVariantMap(Py_ssize_t sipNrElem)
{
    return new ::QVariantMap[sipNrElem];
}


extern "C" {static void *copy_QVariantMap(const void *, Py_ssize_t);}
static void *copy_QVariantMap(const void *sipSrc, Py_ssize_t sipSrcIdx)
{
    return new ::QVariantMap(reinterpret_cast<const ::QVariantMap *>(sipSrc)[sipSrcIdx]);
}


/* Call the mapped type's destructor. */
extern "C" {static void release_QVariantMap(void *, int);}
static void release_QVariantMap(void *sipCppV, int)
{
    ::QVariantMap *sipCpp = reinterpret_cast< ::QVariantMap *>(sipCppV);
    delete sipCpp;
}



extern "C" {static int convertTo_QVariantMap(PyObject *, void **, int *, PyObject *);}
static int convertTo_QVariantMap(PyObject *sipPy, void **sipCppPtrV, int *sipIsErr, PyObject *sipTransferObj)
{
    ::QVariantMap **sipCppPtr = reinterpret_cast< ::QVariantMap **>(sipCppPtrV);

#line 32 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qpycore_qvariantmap.sip"
    if (!sipIsErr)
        return PyDict_Check(sipPy);

    QVariantMap *qvm = new QVariantMap;

    if (!qpycore_toQVariantMap(sipPy, *qvm))
    {
        delete qvm;
        return 0;
    }

    *sipCppPtr = qvm;
 
    return sipGetState(sipTransferObj);
#line 84 "/build/pyqt5/src/PyQt5-5.15.11/build/QtCore/sipQtCoreQVariantMap.cpp"
}


extern "C" {static PyObject *convertFrom_QVariantMap(void *, PyObject *);}
static PyObject *convertFrom_QVariantMap(void *sipCppV, PyObject *)
{
    ::QVariantMap *sipCpp = reinterpret_cast< ::QVariantMap *>(sipCppV);

#line 28 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qpycore_qvariantmap.sip"
    return qpycore_fromQVariantMap(*sipCpp);
#line 95 "/build/pyqt5/src/PyQt5-5.15.11/build/QtCore/sipQtCoreQVariantMap.cpp"
}


sipMappedTypeDef sipTypeDef_QtCore_QVariantMap = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_MAPPED,
        sipNameNr_QVariantMap,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        -1,
        {0, 0, 1},
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR}
    },
    assign_QVariantMap,
    array_QVariantMap,
    copy_QVariantMap,
    release_QVariantMap,
    convertTo_QVariantMap,
    convertFrom_QVariantMap
};
