/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.6.2
 *
 * Copyright (c) 2022 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 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qcalendar.sip"
#include <qcalendar.h>
#line 40 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qcalendar.sip"
#include <qcalendar.h>
#line 31 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQCalendarYearMonthDay.cpp"



PyDoc_STRVAR(doc_QCalendar_YearMonthDay_isValid, "isValid(self) -> bool");

extern "C" {static PyObject *meth_QCalendar_YearMonthDay_isValid(PyObject *, PyObject *);}
static PyObject *meth_QCalendar_YearMonthDay_isValid(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QCalendar::YearMonthDay *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QCalendar_YearMonthDay, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->isValid();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_YearMonthDay, sipName_isValid, doc_QCalendar_YearMonthDay_isValid);

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_QCalendar_YearMonthDay(void *, int);}
static void release_QCalendar_YearMonthDay(void *sipCppV, int)
{
    delete reinterpret_cast< ::QCalendar::YearMonthDay *>(sipCppV);
}


extern "C" {static void *array_QCalendar_YearMonthDay(Py_ssize_t);}
static void *array_QCalendar_YearMonthDay(Py_ssize_t sipNrElem)
{
    return new  ::QCalendar::YearMonthDay[sipNrElem];
}


extern "C" {static void array_delete_QCalendar_YearMonthDay(void *);}
static void array_delete_QCalendar_YearMonthDay(void *sipCpp)
{
    delete[] reinterpret_cast< ::QCalendar::YearMonthDay *>(sipCpp);
}


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


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


extern "C" {static void dealloc_QCalendar_YearMonthDay(sipSimpleWrapper *);}
static void dealloc_QCalendar_YearMonthDay(sipSimpleWrapper *sipSelf)
{
    if (sipIsOwnedByPython(sipSelf))
    {
        release_QCalendar_YearMonthDay(sipGetAddress(sipSelf), 0);
    }
}


extern "C" {static void *init_type_QCalendar_YearMonthDay(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_QCalendar_YearMonthDay(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
     ::QCalendar::YearMonthDay *sipCpp = SIP_NULLPTR;

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, ""))
        {
            sipCpp = new  ::QCalendar::YearMonthDay();

            return sipCpp;
        }
    }

    {
        int a0;
        int a1 = 1;
        int a2 = 1;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            sipName_month,
            sipName_day,
        };

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "i|ii", &a0, &a1, &a2))
        {
            sipCpp = new  ::QCalendar::YearMonthDay(a0,a1,a2);

            return sipCpp;
        }
    }

    {
        const  ::QCalendar::YearMonthDay* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9", sipType_QCalendar_YearMonthDay, &a0))
        {
            sipCpp = new  ::QCalendar::YearMonthDay(*a0);

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QCalendar_YearMonthDay[] = {
    {sipName_isValid, meth_QCalendar_YearMonthDay_isValid, METH_VARARGS, doc_QCalendar_YearMonthDay_isValid}
};


extern "C" {static PyObject *varget_QCalendar_YearMonthDay_day(void *, PyObject *, PyObject *);}
static PyObject *varget_QCalendar_YearMonthDay_day(void *sipSelf, PyObject *, PyObject *)
{
    int sipVal;
     ::QCalendar::YearMonthDay *sipCpp = reinterpret_cast< ::QCalendar::YearMonthDay *>(sipSelf);

    sipVal = sipCpp->day;

    return PyLong_FromLong(sipVal);
}


extern "C" {static int varset_QCalendar_YearMonthDay_day(void *, PyObject *, PyObject *);}
static int varset_QCalendar_YearMonthDay_day(void *sipSelf, PyObject *sipPy, PyObject *)
{
    int sipVal;
     ::QCalendar::YearMonthDay *sipCpp = reinterpret_cast< ::QCalendar::YearMonthDay *>(sipSelf);

    sipVal = sipLong_AsInt(sipPy);

    if (PyErr_Occurred() != SIP_NULLPTR)
        return -1;

    sipCpp->day = sipVal;

    return 0;
}


extern "C" {static PyObject *varget_QCalendar_YearMonthDay_month(void *, PyObject *, PyObject *);}
static PyObject *varget_QCalendar_YearMonthDay_month(void *sipSelf, PyObject *, PyObject *)
{
    int sipVal;
     ::QCalendar::YearMonthDay *sipCpp = reinterpret_cast< ::QCalendar::YearMonthDay *>(sipSelf);

    sipVal = sipCpp->month;

    return PyLong_FromLong(sipVal);
}


extern "C" {static int varset_QCalendar_YearMonthDay_month(void *, PyObject *, PyObject *);}
static int varset_QCalendar_YearMonthDay_month(void *sipSelf, PyObject *sipPy, PyObject *)
{
    int sipVal;
     ::QCalendar::YearMonthDay *sipCpp = reinterpret_cast< ::QCalendar::YearMonthDay *>(sipSelf);

    sipVal = sipLong_AsInt(sipPy);

    if (PyErr_Occurred() != SIP_NULLPTR)
        return -1;

    sipCpp->month = sipVal;

    return 0;
}


extern "C" {static PyObject *varget_QCalendar_YearMonthDay_year(void *, PyObject *, PyObject *);}
static PyObject *varget_QCalendar_YearMonthDay_year(void *sipSelf, PyObject *, PyObject *)
{
    int sipVal;
     ::QCalendar::YearMonthDay *sipCpp = reinterpret_cast< ::QCalendar::YearMonthDay *>(sipSelf);

    sipVal = sipCpp->year;

    return PyLong_FromLong(sipVal);
}


extern "C" {static int varset_QCalendar_YearMonthDay_year(void *, PyObject *, PyObject *);}
static int varset_QCalendar_YearMonthDay_year(void *sipSelf, PyObject *sipPy, PyObject *)
{
    int sipVal;
     ::QCalendar::YearMonthDay *sipCpp = reinterpret_cast< ::QCalendar::YearMonthDay *>(sipSelf);

    sipVal = sipLong_AsInt(sipPy);

    if (PyErr_Occurred() != SIP_NULLPTR)
        return -1;

    sipCpp->year = sipVal;

    return 0;
}

sipVariableDef variables_QCalendar_YearMonthDay[] = {
    {InstanceVariable, sipName_day, (PyMethodDef *)varget_QCalendar_YearMonthDay_day, (PyMethodDef *)varset_QCalendar_YearMonthDay_day, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_month, (PyMethodDef *)varget_QCalendar_YearMonthDay_month, (PyMethodDef *)varset_QCalendar_YearMonthDay_month, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_year, (PyMethodDef *)varget_QCalendar_YearMonthDay_year, (PyMethodDef *)varset_QCalendar_YearMonthDay_year, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_QCalendar_YearMonthDay, "\1QCalendar.YearMonthDay()\n"
"QCalendar.YearMonthDay(int, month: int = 1, day: int = 1)\n"
"QCalendar.YearMonthDay(QCalendar.YearMonthDay)");


static pyqt5ClassPluginDef plugin_QCalendar_YearMonthDay = {
    SIP_NULLPTR,
    0,
    SIP_NULLPTR,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtCore_QCalendar_YearMonthDay = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QCalendar__YearMonthDay,
        SIP_NULLPTR,
        &plugin_QCalendar_YearMonthDay
    },
    {
        sipNameNr_YearMonthDay,
        {27, 255, 0},
        1, methods_QCalendar_YearMonthDay,
        0, SIP_NULLPTR,
        3, variables_QCalendar_YearMonthDay,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QCalendar_YearMonthDay,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QCalendar_YearMonthDay,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QCalendar_YearMonthDay,
    assign_QCalendar_YearMonthDay,
    array_QCalendar_YearMonthDay,
    copy_QCalendar_YearMonthDay,
    release_QCalendar_YearMonthDay,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QCalendar_YearMonthDay,
    sizeof ( ::QCalendar::YearMonthDay),
};
