Christopher Bruns wrote:
On Sat, Apr 3, 2010 at 11:53 AM, troy d. straszheim <t...@resophonic.com> wrote:
BOOST_PYTHON_MODULE(mod)
{
 def("sayhello", as<void(conv(object&))>( &sayhello ));
 //  arg converter       ^^^^^^^^^^^^^
};

The as<> might need some clarification....

Thanks Troy for the helpful tip.

I'm still confused by the "as<>" symbol.  Is there a particular boost
header I need to include to get this to work?  I get a compile error
('as' : undeclared identifier) when I try this with 'as<..." or
'boost::python::as<..." or 'boost::as<...".  Plus, my google-fu is too
clumsy to be able to google up the documentation for such a thing.

Sorry to confuse you. My fault. The boost.python code behind this is in a separate repository, here:

  git://gitorious.org/~straszheim/boost/straszheims-python.git

The code has diverged quite a bit  from trunk boost.python by now.
I was only playing with your use case, tossing my results out there. Ravi and I discussed the as<...> interface at length on this list some time ago, and I've recently resumed playing with it.

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

Reply via email to