on Wed Oct 29 2008, Hans Meine wrote:
> On Mittwoch 29 Oktober 2008, David Abrahams wrote:
>> The above should be a complete guide. Any questions?
>
> Great, thanks a lot for the write-up. I think my second question is still
> left, at least from your post and the docs at
> http://www.boost.o
on Wed Oct 29 2008, "Dan Eloff" wrote:
> On Wed, Oct 29, 2008 at 3:55 PM, David Abrahams <[EMAIL PROTECTED]> wrote:
>> The above should be a complete guide. Any questions?
>
> Just two.
>
> 1) Should it be object(handle<>(borrowed(ptr))) or
> object(borrowed(ptr)) ? Both seem to compile.
*
On Wed, Oct 29, 2008 at 3:55 PM, David Abrahams <[EMAIL PROTECTED]> wrote:
> The above should be a complete guide. Any questions?
Just two.
1) Should it be object(handle<>(borrowed(ptr))) or
object(borrowed(ptr)) ? Both seem to compile.
2) Can I repost that to a boost::python wiki, givng you cr
On Mittwoch 29 Oktober 2008, David Abrahams wrote:
> The above should be a complete guide. Any questions?
Great, thanks a lot for the write-up. I think my second question is still
left, at least from your post and the docs at
http://www.boost.org/doc/libs/1_36_0/libs/python/doc/v2/handle.html
I
on Wed Oct 29 2008, Hans Meine wrote:
> On Mittwoch 29 Oktober 2008, Dan Eloff wrote:
>> When creating an object from a PyObject *, how do you distinguish
>> between a PyObject pointer that is a new reference (must not be
>> increfed, but must be decrefed) versus a PyObject * that is a borrowed
On Wed, Oct 29, 2008 at 3:29 PM, Alex Mohr <[EMAIL PROTECTED]> wrote:
> The documentation isn't great, but the name 'borrowed' is a hint. Using
> borrowed instructs boost.python that the PyObject * is a borrowed reference.
> So you can use:
>
> object(handle<>(borrowed(ptr)))
>
> for when ptr is
The best I could find was object(borrowed(ptr)) for new references and
object(handle<>(ptr)) for borrowed pointers. I'm not sure if that is
accurate, but if so that deserves a nomination for a terrible
interface award.
The documentation isn't great, but the name 'borrowed' is a hint. Using
bor
On Mittwoch 29 Oktober 2008, Dan Eloff wrote:
> When creating an object from a PyObject *, how do you distinguish
> between a PyObject pointer that is a new reference (must not be
> increfed, but must be decrefed) versus a PyObject * that is a borrowed
> reference? (should be increfed and decrefed)
When creating an object from a PyObject *, how do you distinguish
between a PyObject pointer that is a new reference (must not be
increfed, but must be decrefed) versus a PyObject * that is a borrowed
reference? (should be increfed and decrefed)
A very simple question for which there is no documen