[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] How does PyQt handle inlined functions?
From: Dimitar Dobrev <dpldobrev () yahoo ! com>
Date: 2013-11-23 16:55:45
Message-ID: 1385225745.59973.YahooMailNeo () web122403 ! mail ! ne1 ! yahoo ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
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.
Regards,
Dimitar
On Saturday, November 23, 2013 5:55 PM, David Boddie <david@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
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
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?
Regards,
David
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@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@riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[Attachment #5 (text/html)]
<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, \
Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt"><div \
style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica \
Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; \
font-style: normal;"><br><span class=""> I am curious about how it \
works because I develop bindings for Qt myself. They are for C#, you can find the \
code at <a href="https://github.com/ddobrev/QtSharp"><span>https://github.com/ddobrev/QtSharp</span></a>. \
I compile C++ wrappers for inlines myself but I was wondering if there was some \
cleaner way</span><span class="">.</span></div><div style="color: rgb(0, 0, 0); \
font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida \
Grande,sans-serif; background-color: transparent; font-style: normal;"><br><span \
class=""></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: \
HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; \
background-color: transparent; font-style: normal;"><span class=""> \
Regards,</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: \
HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; \
background-color: transparent; font-style: normal;"><span class=""> \
Dimitar</span><br><span class=""> <br></span></div><div \
style="display: block;" class="yahoo_quoted"> <br> <br> <div style="font-family: \
HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; \
font-size: 12pt;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, \
Arial, Lucida Grande, sans-serif; font-size: 12pt;"> <div dir="ltr"> <font \
face="Arial" size="2"> On Saturday, November 23, 2013 5:55 PM, David Boddie \
<david@boddie.org.uk> wrote:<br> </font> </div> <div \
class="y_msg_container">The wrapper code is C++. To see how it works, download the \
source files for<br clear="none">PyQt and look in the sip directory. This contains \
sip files for the Qt<br clear="none">classes.<br clear="none"><br clear="none">When \
you run configure.py, C++ code is generated in the directories called<br \
clear="none">QtCore, QtGui, and so on. You can see how the C++ functions are handled \
by<br clear="none">looking at the wrapper code for QModelIndex which can be found in \
the<br clear="none">QtCore/sipQtCoreQModelIndex.cpp file.<br clear="none"><br \
clear="none">For example, the function that handles column() is \
meth_QModelIndex_column().<br clear="none"><br clear="none">Are you having problems \
with debugging inlined functions, or are you just<br clear="none">curious about how \
it all works?<br clear="none"><br clear="none">Regards,<br clear="none"><br \
clear="none">David<br clear="none"><div class="yqt9286480929" id="yqtfd18091"><br \
clear="none">On Saturday 23. November 2013, you wrote:<br clear="none">> \
Thank you for your reply. This produced wrapper code you mention - is<br \
clear="none">> it Python or C++? If it is Python, how is the C++ implementation of \
the<br clear="none">> original inlined function translated to Python? As an \
example, I can give<br clear="none">> most members of QModelIndex - row(), \
column(), model() and others.<br clear="none">> <br clear="none">> \
Regards,<br clear="none">> Dimitar<br clear="none">> <br \
clear="none">> On Saturday, November 23, 2013 3:32 PM, David Boddie <<a \
shape="rect" ymailto="mailto:david@boddie.org.uk" \
href="mailto:david@boddie.org.uk">david@boddie.org.uk</a>><br clear="none">> \
wrote:<br clear="none">> <br clear="none">> On Fri, 22 Nov 2013 08:49:18 -0800 \
(PST), ddobrev wrote:<br clear="none">> > I was wondering how inlined functions \
are handled in PyQt. I mean not<br clear="none">> > those which are just \
declared inline but the ones that are actually<br clear="none">> > inlined. \
That is, no binary code is generated for them in the containing<br clear="none">> \
> lib during compilation but rather calls to them are replaced with their<br \
clear="none">> > implementation. Does PyQt, for example, distribute additional \
libraries<br clear="none">> > that contain all inlines? If not, what approach \
does it use?<br clear="none">> <br clear="none">> If the function is part of \
the public API then it will be described in a<br clear="none">> sip file and \
inlined in the wrapper code produced by sip.<br clear="none">> <br \
clear="none">> Can you give an example of an inline function that you think would \
need to<br clear="none">> be treated specially?<br clear="none">> <br \
clear="none">> Regards,<br clear="none">> <br clear="none">> David<br \
clear="none">> _______________________________________________<br \
clear="none">> PyQt mailing list <a shape="rect" \
ymailto="mailto:PyQt@riverbankcomputing.com" \
href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a><br \
clear="none">> <a shape="rect" \
href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" \
target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br \
clear="none"><br clear="none"></div><br><br></div> </div> </div> </div> \
</div></body></html>
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic