On 21 Nov 2011 at 13:16, Stefan Seefeld wrote:

> >> I was wondering if it's possible to hook python functions as slots into
> >> boost::signal or boost::signal2 signals? I found an old thread that said
> >> it wasn't directly possible, but it was from 2004.                         
> >>                   
> > Integrating this properly - or rather an enhanced version of it - was 
> > one of the ideas mooted for the next version of Boost.Python some 
> > months ago. Some clever metaprogramming can even allow python to work 
> > with arbitrary function pointers for callbacks :) However I don't 
> > think it's on the cards for what Jim is currently planning.
> 
> Out of curiosity: what are the issues preventing this from "Just Work" ?

Well, as a minimum, my code would need to be recoded to use Boost 
rather than my own metaprogramming library. It would then need to 
pass peer review etc.

However, as a wider issue, deep thought would need to be put into how 
exactly BPL traverses between "python" and "not python" and a 
strictly defined API decided upon. Right now, this boundary isn't 
tightly defined e.g. when you iterate through a wrapped container, 
exactly how far outside python is one venturing etc. Defining it 
tightly and not accidentally introducing problems for yourself later 
would be real tough though. Hence the deep thought being necessary.

Niall

-- 
Technology & Consulting Services - ned Productions Limited.
http://www.nedproductions.biz/. VAT reg: IE 9708311Q. Company no: 
472909.



_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to