--===============2470634244445714129== Content-Type: multipart/alternative; boundary="942553102-1181390872-1385225745=:59973" --942553102-1181390872-1385225745=:59973 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable =0A=A0=A0=A0 I am curious about how it works because I develop bindings for= Qt myself. They are for C#, you can find the code at https://github.com/dd= obrev/QtSharp. I compile C++ wrappers for inlines myself but I was wonderin= g if there was some cleaner way.=0A=0A=A0=A0=A0 Regards,=0A=A0=A0=A0 Dimita= r=0A=A0=A0=A0 =0A=0A=0A=0A=0AOn Saturday, November 23, 2013 5:55 PM, David = Boddie wrote:=0A =0AThe wrapper code is C++. To see h= ow it works, download the source files for=0APyQt and look in the sip direc= tory. This contains sip files for the Qt=0Aclasses.=0A=0AWhen you run confi= gure.py, C++ code is generated in the directories called=0AQtCore, QtGui, a= nd so on. You can see how the C++ functions are handled by=0Alooking at the= wrapper code for QModelIndex which can be found in the=0AQtCore/sipQtCoreQ= ModelIndex.cpp file.=0A=0AFor example, the function that handles column() i= s meth_QModelIndex_column().=0A=0AAre you having problems with debugging in= lined functions, or are you just=0Acurious about how it all works?=0A=0AReg= ards,=0A=0ADavid=0A=0A=0AOn Saturday 23. November 2013, you wrote:=0A>=A0 = =A0 Thank you for your reply. This produced wrapper code you mention - is= =0A> it Python or C++? If it is Python, how is the C++ implementation of th= e=0A> original inlined function translated to Python? As an example, I can = give=0A> most members of QModelIndex - row(), column(), model() and others.= =0A> =0A>=A0 =A0 Regards,=0A>=A0 =A0 Dimitar=0A> =0A> On Saturday, Novemb= er 23, 2013 3:32 PM, David Boddie =0A> wrote:=0A> =0A>= On Fri, 22 Nov 2013 08:49:18 -0800 (PST), ddobrev wrote:=0A> > I was wonde= ring how inlined functions are handled in PyQt. I mean not=0A> > those whic= h are just declared inline but the ones that are actually=0A> > inlined. Th= at is, no binary code is generated for them in the containing=0A> > lib dur= ing compilation but rather calls to them are replaced with their=0A> > impl= ementation. Does PyQt, for example, distribute additional libraries=0A> > t= hat contain all inlines? If not, what approach does it use?=0A> =0A> If the= function is part of the public API then it will be described in a=0A> sip = file and inlined in the wrapper code produced by sip.=0A> =0A> Can you give= an example of an inline function that you think would need to=0A> be treat= ed specially?=0A> =0A> Regards,=0A> =0A> David=0A> ________________________= _______________________=0A> PyQt mailing list=A0 =A0 PyQt@riverbankcomputin= g.com=0A> http://www.riverbankcomputing.com/mailman/listinfo/pyqt --942553102-1181390872-1385225745=:59973 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable

&n= bsp;   I am curious about how it works because I develop bindings= for Qt myself. They are for C#, you can find the code at https://github.com/ddobrev/QtSharp. I compile C++ wrappers for inlines myself but I was wondering if th= ere was some cleaner way.

    Regards,
=
    D= imitar
   


On Saturday, Novembe= r 23, 2013 5:55 PM, David Boddie <david@boddie.org.uk> wrote:
=20
The wrapper code is C++. To see how it work= s, download the source files for
PyQt and look in the sip= directory. This contains sip files for the Qt
classes.
When you run configure.py, C++ code is = generated in the directories called
QtCore, QtGui, and so= on. You can see how the C++ functions are handled by
loo= king at the wrapper code for QModelIndex which can be found in the
QtCore/sipQtCoreQModelIndex.cpp file.

For example, the function that handles column() is meth_QModelInd= ex_column().

Are you having problems w= ith debugging inlined functions, or are you just
curious = about how it all works?

Regards,

David

On Saturday 23. November 2013, you wrote:
>    Thank you for your reply. This produced wrapper code yo= u mention - is
> it Python or C++? If it is Python, ho= w is the C++ implementation of the
> original inlined = function translated to Python? As an example, I can give
= > most members of QModelIndex - row(), column(), model() and others.
>
>    Regards,
>    Dimitar
>
> On Saturday, November 23, 2013 3:32 PM, David Boddie <david@boddie.org.uk>
> wrote:
>
> On Fri, 22 Nov 2013 08:49:18 -0800 = (PST), ddobrev wrote:
> > I was wondering how inlin= ed functions are handled in PyQt. I mean not
> > those which are just declared= inline but the ones that are actually
> > inlined.= That is, no binary code is generated for them in the containing
> > lib during compilation but rather calls to them are rep= laced with their
> > implementation. Does PyQt, for= example, distribute additional libraries
> > that = contain all inlines? If not, what approach does it use?
&= gt;
> If the function is part of the public API then = it will be described in a
> sip file and inlined in th= e wrapper code produced by sip.
>
&= gt; Can you give an example of an inline function that you think would need= to
> be treated specially?
> > Regards,
>
>= ; David
> _______________________________________________
> PyQt mailing list    PyQt@riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt<= br clear=3D"none">


<= /div>
--942553102-1181390872-1385225745=:59973-- --===============2470634244445714129== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt --===============2470634244445714129==--