[C++-sig] Wrapping a callback that takes a const pointer
Hans Meine
hans_meine at gmx.net
Mon Jan 22 10:49:49 CET 2007
On Friday 19 January 2007 19:29, Roman Yakovenko wrote:
> > What is the right way to refer to None in Boost.Python wrapper code?
> > detail::none() is probably wrong. I guess I can just makeobject() that I
> > incref and then return. Is this right?
>
> I would use detail::none() - it is more explicit. I think this
> function belong to boost::python namespace
Although that looks nice, there's another way doing it via the public API
which is much shorter than makeobject() and incref: Just use objects' default
constructor. (I.e. bp::object() )
Greets,
Hans
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20070122/49827f47/attachment.pgp>
More information about the Cplusplus-sig
mailing list