Hi List,

I try to use the new release of sip (4.9.2) and I notice that destructor
wrapping is different from sip 4.7.9. And I have a compilation error:

sip 4.9.2 generate this for the destructor:
        
static void release_SinkTaskBase(void *sipCppV,int sipState)
{
    SinkTaskBase *sipCpp = reinterpret_cast<SinkTaskBase *>(sipCppV);

#line 338 "processlib_tmp.sip"
 Py_BEGIN_ALLOW_THREADS;
 sipCpp->unref();
 Py_END_ALLOW_THREADS;
#line 216 "sipprocesslibSinkTaskBase.cpp"

    Py_BEGIN_ALLOW_THREADS

    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipSinkTaskBase *>(sipCppV);
    else
        delete reinterpret_cast<SinkTaskBase *>(sipCppV);

    Py_END_ALLOW_THREADS
}

and as the SinkTaskBase object has a protected Destructor so the
compilation failed.

previously sip 4.7.9 only use the %MethodCode provide so the wrapping
method look like that:

static void release_SinkTaskBase(void *sipCppV,int)
{
    SinkTaskBase *sipCpp = reinterpret_cast<SinkTaskBase *>(sipCppV);
#line 338 "processlib_tmp.sip"
 Py_BEGIN_ALLOW_THREADS;
 sipCpp->unref();
 Py_END_ALLOW_THREADS;
#line 215 "sipprocesslibSinkTaskBase.cpp"
}

Is there a way (New key word) to wrap a protected or even private
destructor ?


Thanks in advance,

SEB

<<attachment: sebastien_petitdemange.vcf>>

_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to