/*
 * 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 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qregularexpression.sip"
#include <qregularexpression.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.11/build/QtCore/sipQtCoreQRegularExpression.cpp"

#line 27 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.11/build/QtCore/sipQtCoreQRegularExpression.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qregularexpression.sip"
#include <qregularexpression.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.11/build/QtCore/sipQtCoreQRegularExpression.cpp"
#line 36 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qstringlist.sip"
#include <qstringlist.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.11/build/QtCore/sipQtCoreQRegularExpression.cpp"
#line 189 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qregularexpression.sip"
#include <qregularexpression.h>
#line 42 "/build/pyqt5/src/PyQt5-5.15.11/build/QtCore/sipQtCoreQRegularExpression.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qregularexpression.sip"
#include <qregularexpression.h>
#line 45 "/build/pyqt5/src/PyQt5-5.15.11/build/QtCore/sipQtCoreQRegularExpression.cpp"
#line 158 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qregularexpression.sip"
#include <qregularexpression.h>
#line 48 "/build/pyqt5/src/PyQt5-5.15.11/build/QtCore/sipQtCoreQRegularExpression.cpp"


PyDoc_STRVAR(doc_QRegularExpression_patternOptions, "patternOptions(self) -> QRegularExpression.PatternOptions");

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

    {
        const ::QRegularExpression *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QRegularExpression, &sipCpp))
        {
            ::QRegularExpression::PatternOptions*sipRes;

            sipRes = new ::QRegularExpression::PatternOptions(sipCpp->patternOptions());

            return sipConvertFromNewType(sipRes, sipType_QRegularExpression_PatternOptions, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QRegularExpression, sipName_patternOptions, doc_QRegularExpression_patternOptions);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QRegularExpression_setPatternOptions, "setPatternOptions(self, options: QRegularExpression.PatternOptions|QRegularExpression.PatternOption)");

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

    {
        ::QRegularExpression::PatternOptions* a0;
        int a0State = 0;
        ::QRegularExpression *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QRegularExpression, &sipCpp, sipType_QRegularExpression_PatternOptions, &a0, &a0State))
        {
            sipCpp->setPatternOptions(*a0);
            sipReleaseType(a0, sipType_QRegularExpression_PatternOptions, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QRegularExpression, sipName_setPatternOptions, doc_QRegularExpression_setPatternOptions);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QRegularExpression_swap, "swap(self, re: QRegularExpression)");

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

    {
        ::QRegularExpression* a0;
        ::QRegularExpression *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QRegularExpression, &sipCpp, sipType_QRegularExpression, &a0))
        {
            sipCpp->swap(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QRegularExpression, sipName_swap, doc_QRegularExpression_swap);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QRegularExpression_pattern, "pattern(self) -> str");

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

    {
        const ::QRegularExpression *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QRegularExpression, &sipCpp))
        {
            ::QString*sipRes;

            sipRes = new ::QString(sipCpp->pattern());

            return sipConvertFromNewType(sipRes, sipType_QString, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QRegularExpression, sipName_pattern, doc_QRegularExpression_pattern);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QRegularExpression_setPattern, "setPattern(self, pattern: str|None)");

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

    {
        const ::QString* a0;
        int a0State = 0;
        ::QRegularExpression *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QRegularExpression, &sipCpp, sipType_QString, &a0, &a0State))
        {
            sipCpp->setPattern(*a0);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QRegularExpression, sipName_setPattern, doc_QRegularExpression_setPattern);

    return SIP_NULLPTR;
}


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

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

    {
        const ::QRegularExpression *sipCpp;

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

            sipRes = sipCpp->isValid();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QRegularExpression, sipName_isValid, doc_QRegularExpression_isValid);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QRegularExpression_patternErrorOffset, "patternErrorOffset(self) -> int");

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

    {
        const ::QRegularExpression *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QRegularExpression, &sipCpp))
        {
            int sipRes;

            sipRes = sipCpp->patternErrorOffset();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QRegularExpression, sipName_patternErrorOffset, doc_QRegularExpression_patternErrorOffset);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QRegularExpression_errorString, "errorString(self) -> str");

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

    {
        const ::QRegularExpression *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QRegularExpression, &sipCpp))
        {
            ::QString*sipRes;

            sipRes = new ::QString(sipCpp->errorString());

            return sipConvertFromNewType(sipRes, sipType_QString, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QRegularExpression, sipName_errorString, doc_QRegularExpression_errorString);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QRegularExpression_captureCount, "captureCount(self) -> int");

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

    {
        const ::QRegularExpression *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QRegularExpression, &sipCpp))
        {
            int sipRes;

            sipRes = sipCpp->captureCount();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QRegularExpression, sipName_captureCount, doc_QRegularExpression_captureCount);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QRegularExpression_match, "match(self, subject: str|None, offset: int = 0, matchType: QRegularExpression.MatchType = QRegularExpression.NormalMatch, matchOptions: QRegularExpression.MatchOptions|QRegularExpression.MatchOption = QRegularExpression.NoMatchOption) -> QRegularExpressionMatch");

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

    {
        const ::QString* a0;
        int a0State = 0;
        int a1 = 0;
        ::QRegularExpression::MatchType a2 = QRegularExpression::NormalMatch;
        ::QRegularExpression::MatchOptions a3def = QRegularExpression::NoMatchOption;
        ::QRegularExpression::MatchOptions* a3 = &a3def;
        int a3State = 0;
        const ::QRegularExpression *sipCpp;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            sipName_offset,
            sipName_matchType,
            sipName_matchOptions,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1|iEJ1", &sipSelf, sipType_QRegularExpression, &sipCpp, sipType_QString, &a0, &a0State, &a1, sipType_QRegularExpression_MatchType, &a2, sipType_QRegularExpression_MatchOptions, &a3, &a3State))
        {
            ::QRegularExpressionMatch*sipRes;

            sipRes = new ::QRegularExpressionMatch(sipCpp->match(*a0, a1, a2, *a3));
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);
            sipReleaseType(a3, sipType_QRegularExpression_MatchOptions, a3State);

            return sipConvertFromNewType(sipRes, sipType_QRegularExpressionMatch, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QRegularExpression, sipName_match, doc_QRegularExpression_match);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QRegularExpression_globalMatch, "globalMatch(self, subject: str|None, offset: int = 0, matchType: QRegularExpression.MatchType = QRegularExpression.NormalMatch, matchOptions: QRegularExpression.MatchOptions|QRegularExpression.MatchOption = QRegularExpression.NoMatchOption) -> QRegularExpressionMatchIterator");

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

    {
        const ::QString* a0;
        int a0State = 0;
        int a1 = 0;
        ::QRegularExpression::MatchType a2 = QRegularExpression::NormalMatch;
        ::QRegularExpression::MatchOptions a3def = QRegularExpression::NoMatchOption;
        ::QRegularExpression::MatchOptions* a3 = &a3def;
        int a3State = 0;
        const ::QRegularExpression *sipCpp;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            sipName_offset,
            sipName_matchType,
            sipName_matchOptions,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1|iEJ1", &sipSelf, sipType_QRegularExpression, &sipCpp, sipType_QString, &a0, &a0State, &a1, sipType_QRegularExpression_MatchType, &a2, sipType_QRegularExpression_MatchOptions, &a3, &a3State))
        {
            ::QRegularExpressionMatchIterator*sipRes;

            sipRes = new ::QRegularExpressionMatchIterator(sipCpp->globalMatch(*a0, a1, a2, *a3));
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);
            sipReleaseType(a3, sipType_QRegularExpression_MatchOptions, a3State);

            return sipConvertFromNewType(sipRes, sipType_QRegularExpressionMatchIterator, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QRegularExpression, sipName_globalMatch, doc_QRegularExpression_globalMatch);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QRegularExpression_escape, "escape(str: str|None) -> str");

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

    {
        const ::QString* a0;
        int a0State = 0;

        if (sipParseArgs(&sipParseErr, sipArgs, "J1", sipType_QString, &a0, &a0State))
        {
            ::QString*sipRes;

            sipRes = new ::QString(::QRegularExpression::escape(*a0));
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            return sipConvertFromNewType(sipRes, sipType_QString, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QRegularExpression, sipName_escape, doc_QRegularExpression_escape);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QRegularExpression_namedCaptureGroups, "namedCaptureGroups(self) -> list[str]");

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

    {
        const ::QRegularExpression *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QRegularExpression, &sipCpp))
        {
            ::QStringList*sipRes;

            sipRes = new ::QStringList(sipCpp->namedCaptureGroups());

            return sipConvertFromNewType(sipRes, sipType_QStringList, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QRegularExpression, sipName_namedCaptureGroups, doc_QRegularExpression_namedCaptureGroups);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QRegularExpression_optimize, "optimize(self)");

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

    {
        const ::QRegularExpression *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QRegularExpression, &sipCpp))
        {
            sipCpp->optimize();

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QRegularExpression, sipName_optimize, doc_QRegularExpression_optimize);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QRegularExpression_wildcardToRegularExpression, "wildcardToRegularExpression(str: str|None) -> str");

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

    {
        const ::QString* a0;
        int a0State = 0;

        if (sipParseArgs(&sipParseErr, sipArgs, "J1", sipType_QString, &a0, &a0State))
        {
            ::QString*sipRes;

            sipRes = new ::QString(::QRegularExpression::wildcardToRegularExpression(*a0));
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            return sipConvertFromNewType(sipRes, sipType_QString, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QRegularExpression, sipName_wildcardToRegularExpression, doc_QRegularExpression_wildcardToRegularExpression);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QRegularExpression_anchoredPattern, "anchoredPattern(expression: str|None) -> str");

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

    {
        const ::QString* a0;
        int a0State = 0;

        if (sipParseArgs(&sipParseErr, sipArgs, "J1", sipType_QString, &a0, &a0State))
        {
            ::QString*sipRes;

            sipRes = new ::QString(::QRegularExpression::anchoredPattern(*a0));
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            return sipConvertFromNewType(sipRes, sipType_QString, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QRegularExpression, sipName_anchoredPattern, doc_QRegularExpression_anchoredPattern);

    return SIP_NULLPTR;
}


extern "C" {static long slot_QRegularExpression___hash__(PyObject *);}
static long slot_QRegularExpression___hash__(PyObject *sipSelf)
{
    ::QRegularExpression *sipCpp = reinterpret_cast< ::QRegularExpression *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QRegularExpression));

    if (!sipCpp)
        return 0L;


    {
        {
            long sipRes = 0;

#line 138 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qregularexpression.sip"
        sipRes = qHash(*sipCpp);
#line 523 "/build/pyqt5/src/PyQt5-5.15.11/build/QtCore/sipQtCoreQRegularExpression.cpp"

            return sipRes;
        }
    }

    return 0;
}


extern "C" {static PyObject *slot_QRegularExpression___ne__(PyObject *, PyObject *);}
static PyObject *slot_QRegularExpression___ne__(PyObject *sipSelf, PyObject *sipArg)
{
    ::QRegularExpression *sipCpp = reinterpret_cast< ::QRegularExpression *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QRegularExpression));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QRegularExpression* a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_QRegularExpression, &a0))
        {
            bool sipRes;

            sipRes = sipCpp->::QRegularExpression::operator!=(*a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI_QtCore, ne_slot, sipType_QRegularExpression, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_QRegularExpression___eq__(PyObject *, PyObject *);}
static PyObject *slot_QRegularExpression___eq__(PyObject *sipSelf, PyObject *sipArg)
{
    ::QRegularExpression *sipCpp = reinterpret_cast< ::QRegularExpression *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QRegularExpression));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QRegularExpression* a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_QRegularExpression, &a0))
        {
            bool sipRes;

            sipRes = sipCpp->::QRegularExpression::operator==(*a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI_QtCore, eq_slot, sipType_QRegularExpression, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_QRegularExpression___repr__(PyObject *);}
static PyObject *slot_QRegularExpression___repr__(PyObject *sipSelf)
{
    ::QRegularExpression *sipCpp = reinterpret_cast< ::QRegularExpression *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QRegularExpression));

    if (!sipCpp)
        return SIP_NULLPTR;


    {
        {
            PyObject * sipRes = SIP_NULLPTR;

#line 57 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qregularexpression.sip"
        PyObject *uni = qpycore_PyObject_FromQString(sipCpp->pattern());
        
        if (uni)
        {
        #if PY_MAJOR_VERSION >= 3
            sipRes = PyUnicode_FromFormat("PyQt5.QtCore.QRegularExpression(%R", uni);
        
            if (sipCpp->patternOptions() != QRegularExpression::NoPatternOption)
            {
                qpycore_Unicode_ConcatAndDel(&sipRes,
                        PyUnicode_FromFormat(
                                ", PyQt5.QtCore.QRegularExpression.PatternOptions(%i)",
                                (int)sipCpp->patternOptions()));
            }
        
            qpycore_Unicode_ConcatAndDel(&sipRes, PyUnicode_FromString(")"));
        #else
            sipRes = PyString_FromString("PyQt5.QtCore.QRegularExpression(");
            PyString_ConcatAndDel(&sipRes, PyObject_Repr(uni));
        
            if (sipCpp->patternOptions() != QRegularExpression::NoPatternOption)
            {
                PyString_ConcatAndDel(&sipRes,
                        PyString_FromFormat(
                                ", PyQt5.QtCore.QRegularExpression.PatternOptions(%i)",
                                (int)sipCpp->patternOptions()));
            }
        
            PyString_ConcatAndDel(&sipRes, PyString_FromString(")"));
        #endif
        
            Py_DECREF(uni);
        }
        else
        {
            sipRes = 0;
        }
#line 642 "/build/pyqt5/src/PyQt5-5.15.11/build/QtCore/sipQtCoreQRegularExpression.cpp"

            return sipRes;
        }
    }

    return 0;
}


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


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const ::QString* a0;
        int a0State = 0;
        ::QRegularExpression::PatternOptions a1def = QRegularExpression::NoPatternOption;
        ::QRegularExpression::PatternOptions* a1 = &a1def;
        int a1State = 0;

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

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J1|J1", sipType_QString, &a0, &a0State, sipType_QRegularExpression_PatternOptions, &a1, &a1State))
        {
            sipCpp = new ::QRegularExpression(*a0, *a1);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);
            sipReleaseType(a1, sipType_QRegularExpression_PatternOptions, a1State);

            return sipCpp;
        }
    }

    {
        const ::QRegularExpression* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's Python slots. */
static sipPySlotDef slots_QRegularExpression[] = {
    {(void *)slot_QRegularExpression___hash__, hash_slot},
    {(void *)slot_QRegularExpression___ne__, ne_slot},
    {(void *)slot_QRegularExpression___eq__, eq_slot},
    {(void *)slot_QRegularExpression___repr__, repr_slot},
    {0, (sipPySlotType)0}
};


static PyMethodDef methods_QRegularExpression[] = {
    {sipName_anchoredPattern, meth_QRegularExpression_anchoredPattern, METH_VARARGS, doc_QRegularExpression_anchoredPattern},
    {sipName_captureCount, meth_QRegularExpression_captureCount, METH_VARARGS, doc_QRegularExpression_captureCount},
    {sipName_errorString, meth_QRegularExpression_errorString, METH_VARARGS, doc_QRegularExpression_errorString},
    {sipName_escape, meth_QRegularExpression_escape, METH_VARARGS, doc_QRegularExpression_escape},
    {sipName_globalMatch, SIP_MLMETH_CAST(meth_QRegularExpression_globalMatch), METH_VARARGS|METH_KEYWORDS, doc_QRegularExpression_globalMatch},
    {sipName_isValid, meth_QRegularExpression_isValid, METH_VARARGS, doc_QRegularExpression_isValid},
    {sipName_match, SIP_MLMETH_CAST(meth_QRegularExpression_match), METH_VARARGS|METH_KEYWORDS, doc_QRegularExpression_match},
    {sipName_namedCaptureGroups, meth_QRegularExpression_namedCaptureGroups, METH_VARARGS, doc_QRegularExpression_namedCaptureGroups},
    {sipName_optimize, meth_QRegularExpression_optimize, METH_VARARGS, doc_QRegularExpression_optimize},
    {sipName_pattern, meth_QRegularExpression_pattern, METH_VARARGS, doc_QRegularExpression_pattern},
    {sipName_patternErrorOffset, meth_QRegularExpression_patternErrorOffset, METH_VARARGS, doc_QRegularExpression_patternErrorOffset},
    {sipName_patternOptions, meth_QRegularExpression_patternOptions, METH_VARARGS, doc_QRegularExpression_patternOptions},
    {sipName_setPattern, meth_QRegularExpression_setPattern, METH_VARARGS, doc_QRegularExpression_setPattern},
    {sipName_setPatternOptions, meth_QRegularExpression_setPatternOptions, METH_VARARGS, doc_QRegularExpression_setPatternOptions},
    {sipName_swap, meth_QRegularExpression_swap, METH_VARARGS, doc_QRegularExpression_swap},
    {sipName_wildcardToRegularExpression, meth_QRegularExpression_wildcardToRegularExpression, METH_VARARGS, doc_QRegularExpression_wildcardToRegularExpression}
};

static sipEnumMemberDef enummembers_QRegularExpression[] = {
    {sipName_AnchoredMatchOption, static_cast<int>(::QRegularExpression::AnchoredMatchOption), 222},
    {sipName_CaseInsensitiveOption, static_cast<int>(::QRegularExpression::CaseInsensitiveOption), 225},
    {sipName_DontAutomaticallyOptimizeOption, static_cast<int>(::QRegularExpression::DontAutomaticallyOptimizeOption), 225},
    {sipName_DontCaptureOption, static_cast<int>(::QRegularExpression::DontCaptureOption), 225},
    {sipName_DontCheckSubjectStringMatchOption, static_cast<int>(::QRegularExpression::DontCheckSubjectStringMatchOption), 222},
    {sipName_DotMatchesEverythingOption, static_cast<int>(::QRegularExpression::DotMatchesEverythingOption), 225},
    {sipName_ExtendedPatternSyntaxOption, static_cast<int>(::QRegularExpression::ExtendedPatternSyntaxOption), 225},
    {sipName_InvertedGreedinessOption, static_cast<int>(::QRegularExpression::InvertedGreedinessOption), 225},
    {sipName_MultilineOption, static_cast<int>(::QRegularExpression::MultilineOption), 225},
    {sipName_NoMatch, static_cast<int>(::QRegularExpression::NoMatch), 224},
    {sipName_NoMatchOption, static_cast<int>(::QRegularExpression::NoMatchOption), 222},
    {sipName_NoPatternOption, static_cast<int>(::QRegularExpression::NoPatternOption), 225},
    {sipName_NormalMatch, static_cast<int>(::QRegularExpression::NormalMatch), 224},
    {sipName_OptimizeOnFirstUsageOption, static_cast<int>(::QRegularExpression::OptimizeOnFirstUsageOption), 225},
    {sipName_PartialPreferCompleteMatch, static_cast<int>(::QRegularExpression::PartialPreferCompleteMatch), 224},
    {sipName_PartialPreferFirstMatch, static_cast<int>(::QRegularExpression::PartialPreferFirstMatch), 224},
    {sipName_UseUnicodePropertiesOption, static_cast<int>(::QRegularExpression::UseUnicodePropertiesOption), 225},
};

PyDoc_STRVAR(doc_QRegularExpression, "\1QRegularExpression()\n"
"QRegularExpression(pattern: str|None, options: QRegularExpression.PatternOptions|QRegularExpression.PatternOption = QRegularExpression.NoPatternOption)\n"
"QRegularExpression(re: QRegularExpression)");


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


sipClassTypeDef sipTypeDef_QtCore_QRegularExpression = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QRegularExpression,
        SIP_NULLPTR,
        &plugin_QRegularExpression,
    },
    {
        sipNameNr_QRegularExpression,
        {0, 0, 1},
        16, methods_QRegularExpression,
        17, enummembers_QRegularExpression,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QRegularExpression,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    slots_QRegularExpression,
    init_type_QRegularExpression,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QRegularExpression,
    assign_QRegularExpression,
    array_QRegularExpression,
    copy_QRegularExpression,
    release_QRegularExpression,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QRegularExpression,
    sizeof (::QRegularExpression),
};
