Re: [PyKDE] PyQt C API

2005-10-21 Thread Toby Dickenson
On Thursday 20 October 2005 01:36, James Emerton wrote: > I think you should be able to accomplish the same thing with > straight-up SIP, and reduce the number of dependencies to boot. > You can implement your code entirely in the .sip file, as well. (See Sure. I should have mentioned the merits o

Re: [PyKDE] PyQt C API

2005-10-19 Thread James Emerton
> This is the inner loop of the rendering code for a custom graph widget. The > optimisation target isnt the PyQt code itself, but rather the next layer up, > which calls PyQt. It will be much more convenient for this C (or C++, or > pyrex) code to call the Qt C++ API directly. Now, I've never tou

Re: [PyKDE] PyQt C API

2005-10-19 Thread Toby Dickenson
On Tuesday 18 October 2005 18:02, Phil Thompson wrote: > Or you can use the lower level sipConvertToCpp() which skips some error > checking. Thanks. One other problem is how to get the sipWrapperType pointer A sip generated extension module gets these pointers via api_export_module, but th

Re: [PyKDE] PyQt C API

2005-10-18 Thread Phil Thompson
On Tuesday 18 October 2005 5:39 pm, Jim Bublitz wrote: > On Tuesday 18 October 2005 00:44, 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.

Re: [PyKDE] PyQt C API

2005-10-18 Thread Jim Bublitz
On Tuesday 18 October 2005 00:44, 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

Re: [PyKDE] PyQt C API

2005-10-18 Thread Jim Bublitz
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

[PyKDE] PyQt C API

2005-10-18 Thread elho
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)

Re: [PyKDE] PyQt C API

2005-10-18 Thread Giovanni Bajo
Toby Dickenson <[EMAIL PROTECTED]> 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 t

[PyKDE] PyQt C API

2005-10-18 Thread Toby Dickenson
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, -- Toby