/*
 * 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 "sipAPIQtCore.h"

#line 48 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qmutex.sip"
#include <qmutex.h>
#line 29 "/build/pyqt6/src/pyqt6-6.11.0/build/QtCore/sipQtCoreQRecursiveMutex.cpp"

#line 26 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qdeadlinetimer.sip"
#include <qdeadlinetimer.h>
#line 33 "/build/pyqt6/src/pyqt6-6.11.0/build/QtCore/sipQtCoreQRecursiveMutex.cpp"


PyDoc_STRVAR(doc_QRecursiveMutex_lock, "lock(self)");

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

    {
        ::QRecursiveMutex *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QRecursiveMutex, &sipCpp))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->lock();
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QRecursiveMutex, sipName_lock, doc_QRecursiveMutex_lock);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QRecursiveMutex_tryLock, "tryLock(self, a0: QDeadlineTimer) -> bool\n"
"tryLock(self, timeout: int = 0) -> bool");

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

    {
        ::QDeadlineTimer* a0;
        ::QRecursiveMutex *sipCpp;

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, SIP_NULLPTR, "BJ9", &sipSelf, sipType_QRecursiveMutex, &sipCpp, sipType_QDeadlineTimer, &a0))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->tryLock(*a0);
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

    {
        int a0 = 0;
        ::QRecursiveMutex *sipCpp;

        static const char *sipKwdList[] = {
            sipName_timeout,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|i", &sipSelf, sipType_QRecursiveMutex, &sipCpp, &a0))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->tryLock(a0);
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QRecursiveMutex, sipName_tryLock, doc_QRecursiveMutex_tryLock);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QRecursiveMutex_unlock, "unlock(self)");

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

    {
        ::QRecursiveMutex *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QRecursiveMutex, &sipCpp))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->unlock();
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QRecursiveMutex, sipName_unlock, doc_QRecursiveMutex_unlock);

    return SIP_NULLPTR;
}


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


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


extern "C" {static void array_delete_QRecursiveMutex(void *);}
static void array_delete_QRecursiveMutex(void *sipCpp)
{
    delete[] reinterpret_cast< ::QRecursiveMutex *>(sipCpp);
}


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


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

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QRecursiveMutex[] = {
    {sipName_lock, meth_QRecursiveMutex_lock, METH_VARARGS, doc_QRecursiveMutex_lock},
    {sipName_tryLock, SIP_MLMETH_CAST(meth_QRecursiveMutex_tryLock), METH_VARARGS|METH_KEYWORDS, doc_QRecursiveMutex_tryLock},
    {sipName_unlock, meth_QRecursiveMutex_unlock, METH_VARARGS, doc_QRecursiveMutex_unlock}
};

PyDoc_STRVAR(doc_QRecursiveMutex, "\1QRecursiveMutex()");


sipClassTypeDef sipTypeDef_QtCore_QRecursiveMutex = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QRecursiveMutex,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_QRecursiveMutex,
        {0, 0, 1},
        3, methods_QRecursiveMutex,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QRecursiveMutex,
    -1,
    sipNameNr_PyQt6_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QRecursiveMutex,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QRecursiveMutex,
    SIP_NULLPTR,
    array_QRecursiveMutex,
    SIP_NULLPTR,
    release_QRecursiveMutex,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QRecursiveMutex,
    sizeof (::QRecursiveMutex),
};
