[Kde-bindings] errors compiling pykde4

Marcos Dione mdione at grulic.org.ar
Sun Jan 24 13:39:18 UTC 2010


    trying to compile kdebindings today I get this error:

sipkpartspart7.cpp: In function ‘PyObject* meth_KParts_BrowserOpenOrSaveQuestion_setSuggestedFileName(PyObject*, PyObject*)’:
sipkpartspart7.cpp:73: error: cannot convert ‘int*’ to ‘PyObject**’ in argument passing
sipkpartspart7.cpp:87: error: invalid conversion from ‘int’ to ‘PyObject*’
sipkpartspart7.cpp:87: error: too few arguments to function

    the (generated) code prays:

extern "C" {static PyObject *meth_KParts_BrowserOpenOrSaveQuestion_setSuggestedFileName(PyObject *, PyObject *);}
static PyObject *meth_KParts_BrowserOpenOrSaveQuestion_setSuggestedFileName(PyObject *sipSelf,PyObject *sipArgs)
{
    int sipArgsParsed = 0; // <==== here

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

        if (sipParseArgs(&sipArgsParsed,sipArgs,"BJ1",&sipSelf,sipType_KParts_BrowserOpenOrSaveQuestion,&sipCpp,sipType_QString,&a0,&a0State)) // <=== errors appear here...
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->setSuggestedFileName(*a0);
            Py_END_ALLOW_THREADS

            sipReleaseType(const_cast<QString *>(a0),sipType_QString,a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipArgsParsed,sipName_BrowserOpenOrSaveQuestion,sipName_setSuggestedFileName); // <=== ... and here.

    return NULL;
}

    I think the bug lies in the definition of sipArgsParsed. shouldn't it be a PyObject?

    the relevant parts of cmake's output says:

-- Found Qt-Version 4.6.1 (using /home/mdione/local/soft/kde4/bin/qmake)
-- Found PythonInterp: /usr/bin/python2.6
-- Found Python executable: /usr/bin/python2.6
-- Found Python version: 2.6.4+
-- Found Python library: /usr/lib/libpython2.6.so
-- Found Python executable: /usr/bin/python2.6
-- Found Python version: 2.6.4+
-- Found Python library: /usr/lib/libpython2.6.so
-- Python Libraries: /usr/lib/libpython2.6.so
-- Python Include Path: /usr/include/python2.6
-- Found SIP version: 4.10
-- Found PyQt4 version: 4.7

    should I provide anything else to hunt this bug?

-- 
(Not so) Random fortune:
A lot of parenting is really just trial and error...
... mostly errors.
            -- http://www.unitedmedia.com/comics/committed/



More information about the Kde-bindings mailing list