/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.7.0
 *
 * Copyright (c) 2022 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt6.
 * 
 * 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 72 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtCore/qglobal.sip"
#include <QtGlobal>
#line 29 "/build/pyqt6/src/PyQt6-6.4.0/build/QtCore/sipQtCoreqintptr.cpp"



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


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


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


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



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

#line 76 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtCore/qglobal.sip"
    qintptr ptr = (qintptr)sipConvertToVoidPtr(sipPy);

    if (!sipIsErr)
        return !PyErr_Occurred();

    // Mapped types deal with pointers, so create one on the heap.
    qintptr *heap = new qintptr;
    *heap = ptr;

    *sipCppPtr = heap;

    // Make sure the pointer doesn't leak.
    return SIP_TEMPORARY;
#line 83 "/build/pyqt6/src/PyQt6-6.4.0/build/QtCore/sipQtCoreqintptr.cpp"
}


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

#line 92 "/build/pyqt6/src/PyQt6-6.4.0/sip/QtCore/qglobal.sip"
    return sipConvertFromVoidPtr((void *)*sipCpp);
#line 94 "/build/pyqt6/src/PyQt6-6.4.0/build/QtCore/sipQtCoreqintptr.cpp"
}


sipMappedTypeDef sipTypeDef_QtCore_qintptr = {
    {
        SIP_NULLPTR,
        SIP_TYPE_MAPPED,
        sipNameNr_qintptr,
        SIP_NULLPTR,
        SIP_NULLPTR
    },
    {
        -1,
        {0, 0, 1},
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
    },
    assign_qintptr,
    array_qintptr,
    copy_qintptr,
    release_qintptr,
    convertTo_qintptr,
    convertFrom_qintptr
};
