[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] Function pointers and SIP
From: Giovanni Bajo <rasky () develer ! com>
Date: 2009-06-19 1:27:02
Message-ID: 1245374822.4796.120.camel () ozzu
[Download RAW message or body]
On gio, 2009-06-18 at 19:01 +0100, Phil Thompson wrote:
> On Thu, 18 Jun 2009 19:40:08 +0200, Giovanni Bajo <rasky@develer.com>
> wrote:
> > Hi Phil,
> >
> > given a C++ object where you can register callbacks such as:
> >
> > void registerCallback(void (*cb)(void*), void* user_data);
> >
> > or
> >
> > void registerCallback(std::tr1::function<void (void)> cb);
> >
> > how would you wrap them in SIP? Is there some code in PyQt that I can
> > look at?
>
> I think you answered this yourself a couple of weeks back.
I had a general idea of course, but I wanted to make sure there was not
automa[tg]ic support by SIP which I wasn't aware of.
> The nearest example in PyQt is probably qInstallMsgHandler().
Thanks. Why the internal qtcore_MsgHandler uses
SIP_BLOCK_THREAD/SIP_UNBLOCK_THREADS? Is that always needed or only if I
have previously explicitly released the GIL?
--
Giovanni Bajo
Develer S.r.l.
http://www.develer.com
_______________________________________________
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