/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.15.3
 *
 * Copyright (c) 2026 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 "sipAPIQtNetwork.h"

#line 61 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qpycore_std_optional.sip"
#include <optional>
#include <qlist.h>
#line 30 "/build/pyqt6/src/pyqt6-6.11.0/build/QtNetwork/sipQtNetworkstdoptional0600QList0100QDateTime.cpp"

#line 262 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qdatetime.sip"
#include <qdatetime.h>
#line 34 "/build/pyqt6/src/pyqt6-6.11.0/build/QtNetwork/sipQtNetworkstdoptional0600QList0100QDateTime.cpp"


extern "C" {static void assign_std_optional_0600QList_0100QDateTime(void *, Py_ssize_t, void *);}
static void assign_std_optional_0600QList_0100QDateTime(void *sipDst, Py_ssize_t sipDstIdx, void *sipSrc)
{
    reinterpret_cast<std::optional<QList<QDateTime>> *>(sipDst)[sipDstIdx] = *reinterpret_cast<std::optional<QList<QDateTime>> *>(sipSrc);
}


extern "C" {static void *array_std_optional_0600QList_0100QDateTime(Py_ssize_t);}
static void *array_std_optional_0600QList_0100QDateTime(Py_ssize_t sipNrElem)
{
    return new std::optional<QList<QDateTime>>[sipNrElem];
}


extern "C" {static void *copy_std_optional_0600QList_0100QDateTime(const void *, Py_ssize_t);}
static void *copy_std_optional_0600QList_0100QDateTime(const void *sipSrc, Py_ssize_t sipSrcIdx)
{
    return new std::optional<QList<QDateTime>>(reinterpret_cast<const std::optional<QList<QDateTime>> *>(sipSrc)[sipSrcIdx]);
}


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



extern "C" {static PyObject *convertFrom_std_optional_0600QList_0100QDateTime(void *, PyObject *);}
static PyObject *convertFrom_std_optional_0600QList_0100QDateTime(void *sipCppV, PyObject *sipTransferObj)
{
    std::optional<QList<QDateTime>> *sipCpp = reinterpret_cast<std::optional<QList<QDateTime>> *>(sipCppV);

#line 66 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qpycore_std_optional.sip"
    if (!sipCpp->has_value())
    {
        Py_INCREF(Py_None);
        return Py_None;
    }

    QList<QDateTime> &value = sipCpp->value();

    PyObject *l = PyList_New(value.size());

    if (!l)
        return 0;

    for (qsizetype i = 0; i < value.size(); ++i)
    {
        QDateTime *t = new QDateTime(value.at(i));
        PyObject *tobj = sipConvertFromNewType(t, sipType_QDateTime,
                sipTransferObj);

        if (!tobj)
        {
            delete t;
            Py_DECREF(l);

            return 0;
        }

        PyList_SetItem(l, i, tobj);
    }

    return l;
#line 105 "/build/pyqt6/src/pyqt6-6.11.0/build/QtNetwork/sipQtNetworkstdoptional0600QList0100QDateTime.cpp"
}


sipMappedTypeDef sipTypeDef_QtNetwork_std_optional_0600QList_0100QDateTime = {
    {
        SIP_NULLPTR,
        SIP_TYPE_MAPPED,
        sipNameNr_2111,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        -1,
        {0, 0, 1},
        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_std_optional_0600QList_0100QDateTime,
    array_std_optional_0600QList_0100QDateTime,
    copy_std_optional_0600QList_0100QDateTime,
    release_std_optional_0600QList_0100QDateTime,
    SIP_NULLPTR,
    convertFrom_std_optional_0600QList_0100QDateTime
};
