[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyKDE] PyQt C API
From: Jim Bublitz <jbublitz () nwinternet ! com>
Date: 2005-10-18 16:42:14
Message-ID: 200510180942.14615.jbublitz () nwinternet ! com
[Download RAW message or body]
On Tuesday 18 October 2005 01:44, elho wrote:
> When I understand your question right, this example will be the answer.
>
>
> PyObject *myPyType;
>
> // convert a PyObject pointer to MyPythonType-Pointer object
> // cppType will be the known CPP-Type which is the base of MyPythonType
> myPyType = sipBuildResult(NULL,"M",cppType,sipClass_MyPythonType)
>
> // catch errors
> if (myPyType == NULL)
> {
> Py_XDECREF(myPyType);
> return NULL;
> }
I think he wants to go the other direction, but between your post and mine we
covered both conversions.
Jim
> Toby Dickenson wrote:
> > I am considering translating a few functions of our large PyQt
> > application to C (or, probably, pyrex) as a performance optimisation, but
> > I have stumbled at the first hurdle. How do you convert a PyObject
> > pointer to a PyQt object into a pointer to the Qt C++ object?
> >
> > Thanks in advance,
>
> _______________________________________________
> PyKDE mailing list PyKDE@mats.imk.fraunhofer.de
> http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
_______________________________________________
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