On Fri, 2009-02-27 at 07:35 -0800, Ralf W. Grosse-Kunstleve wrote:
> The trick is to use boost::python::handle:
> 
> http://www.boost.org/doc/libs/1_38_0/libs/python/doc/v2/handle.html
> 
> For example:
> 
> object python_file((handle<>(borrowed(obj_ptr))));

Thanks, but like much of the documentation, I find that page very
unclear. Is there anything that states more obviously what should be
done in the two cases I mentioned.

> I can't find any definitive documentation that tells me how I should get
> a boost::python::object to wrap an existing PyObject*. I guess that
> there's a way to do it that uses an existing reference, and a way that
> takes an extra reference.
> 
-- 
Murray Cumming
murr...@murrayc.com
www.murrayc.com
www.openismus.com


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

Reply via email to