[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyKDE] Re: dcop
From: Phil Thompson <phil () riverbankcomputing ! co ! uk>
Date: 2004-05-27 16:44:03
Message-ID: 200405271744.03158.phil () riverbankcomputing ! co ! uk
[Download RAW message or body]
On Thursday 27 May 2004 5:33 pm, Stefan Bund wrote:
> Stefan Bund <l-pykde.z.xalan@xoxy.net> writes:
> > I have however a Problem in my PyDCOP.DCOPClient implementation. I get
> > a "SystemError: ../Objects/classobject.c:518: bad argument to internal
> > function" when calling DCOPClient::call from python:
>
> After thinking about it a little, I started dissecting the source. I
> found classobject.c in the python2.3 source. The above mentioned line
> is in PyInstance_NewRaw. This is happily only called from very few
> places. Looking at siplib, the only place this can be called from
> (indirectly) seems to be sipNewCppToSelf.
>
> Ok. At the other end, I looked at the generated code for
> DCOPClient::call in dcop/dcoppart0.cpp. Here I find the call
>
> return sipBuildResult(0,"(bPP)",sipRes,a4,a5);
>
> looking up sipBuildResult and from there going to buildObject, I find
> the following code handling the 'P' conversion:
>
> case 'P':
> {
> void *sipCpp = va_arg(va,void *);
> PyObject *cls = va_arg(va,PyObject *);
>
> el =
> sipNewCppToSelf(sipCpp,cls,SIP_PY_OWNED|SIP_SIMPLE); }
>
> break;
>
> With this in mind, the sipBuildResult call looks pretty fishy to
> me. As I read it, it should be
>
> return
> sipBuildResult(0,"(bPP)",sipRes,a4,sipClass_QCString,a5,sipClass_QByteArray
>);
>
> so I manually patched dcoppart0.cpp with above code and voila,
> everything working now. I have however *no* knowledge of sip and don't
> know, how to really fix this, since dcoppart0.cpp is generated from
> sip.
>
> I hope this helps,
>
> Stefan.
What version of SIP are you using? This should be fixed in v3.10.2/4.0rc4.
Phil
_______________________________________________
PyKDE mailing list PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic