[PyQt] How does PyQt handle inlined functions?

Dimitar Dobrev dpldobrev at yahoo.com
Sat Nov 23 16:55:45 GMT 2013

    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 there was some cleaner way.


On Saturday, November 23, 2013 5:55 PM, David Boddie <david at boddie.org.uk> wrote:
The wrapper code is C++. To see how it works, download the source files for
PyQt and look in the sip directory. This contains sip files for the Qt

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
looking 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_QModelIndex_column().

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



On Saturday 23. November 2013, you wrote:
>     Thank you for your reply. This produced wrapper code you mention - is
> it Python or C++? If it is Python, how 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 at boddie.org.uk>
> wrote:
> On Fri, 22 Nov 2013 08:49:18 -0800 (PST), ddobrev wrote:
> > I was wondering how inlined 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 replaced with their
> > implementation. Does PyQt, for example, distribute additional libraries
> > that contain all inlines? If not, what approach does it use?
> If the function is part of the public API then it will be described in a
> sip file and inlined in the wrapper code produced by sip.
> Can you give an example of an inline function that you think would need to
> be treated specially?
> Regards,
> David
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20131123/f555cb89/attachment.html>

More information about the PyQt mailing list