Roman Yakovenko wrote:
> On Wed, Feb 4, 2009 at 9:26 PM, Paul Melis
> wrote:
>
>> Hi Roman,
>>
>
> Try this one, works for me:
> // This file has been generated by Py++.
>
> // Copyright 2004-2008 Roman Yakovenko.
> // Distributed under the Bo
Hi Roman,
Roman Yakovenko wrote:
> On Wed, Feb 4, 2009 at 8:49 PM, Paul Melis
> wrote:
>
>> Classes with protected destructors (as found when custom reference
>> counting is used) seem to cause some trouble when using bp::wrapper<>
>> containing a method
Hello,
Classes with protected destructors (as found when custom reference
counting is used) seem to cause some trouble when using bp::wrapper<>
containing a method that takes a const reference to a refcounted class.
Say I have:
#include
#include
namespace bp = boost::python;
class Thing
{
p
Paul Melis wrote:
> Roman Yakovenko wrote:
>
>> 2009/1/17 Paul Melis :
>>
>>
>>> But when trying to run
>>>
>>> import doh
>>>
>>> class MyCallback(doh.Callback):
>>>def execute(self, t):
>>
Roman Yakovenko wrote:
> 2009/1/17 Paul Melis :
>
>> But when trying to run
>>
>> import doh
>>
>> class MyCallback(doh.Callback):
>>def execute(self, t):
>>print t
>>return 1
>>
>> m = MyCallback()
>>
Given two reference-counted classes Thing and Callback, and using a
custom smart pointer ref_ptr, with all the needed pointee stuff added
and using ref_ptr<..> as held type I'm getting into trouble when trying
to use a boost::python::wrapper<> derived class. See the attached files
for the complete
Roman Yakovenko wrote:
> On Mon, Dec 8, 2008 at 6:42 PM, Stefan Seefeld <[EMAIL PROTECTED]> wrote:
>
>> Hans Meine wrote:
>>
>>> How about adding an id() method (returning this) to the C++ class and
>>> exporting that?
>>>
>>>
>> Well, this 'id' isn't really a property of the wrapped
Ralf W. Grosse-Kunstleve wrote:
>> In SWIG it is possible to simply define an extra class method that takes a
>> PyObject* and perform any conversion you want in that method (although
>> this means having to add that extra method for all cases where the
>> non-const pointer is used). Would somethin
On Mon, December 8, 2008 4:12 pm, Stefan Seefeld wrote:
> [EMAIL PROTECTED] wrote:
>> Is there are way to get the address of the C++ instance pointed to by a
>> given Boost.Python wrapper object? I don't need a real pointer, the
>> address alone suffices.
>>
>
> You may try using
>
> type const &re
Hello Renato,
On Mon, December 8, 2008 3:36 pm, Renato Araujo wrote:
> Maybe this can help you:
> http://www.boost.org/doc/libs/1_36_0/libs/python/doc/v2/faq.html#xref
>
> I use:
> python::object o(python::ptr(my_cpp_pointer));
>
> then I got the python object.
Unfortunately, I need the (addres
David Abrahams wrote:
> on Mon Nov 10 2008, Paul Melis wrote:
>
>
>> The FAQ entry on this doesn't really help, so perhaps I'm not using the
>> return policy
>> correctly or missing something else. The full test code (which is actually
>> quit
David Abrahams wrote:
> on Sat Nov 01 2008, Paul Melis wrote:
>
>
>> Gustavo Carneiro wrote:
>>
>>> There's an interesting question about whether it's better to use
>>> boost.python or SWIG. I've been using boost.python for y
Gustavo Carneiro wrote:
>
> There's an interesting question about whether it's better to use
> boost.python or SWIG. I've been using boost.python for years, so I
> have a lot invested in it, but if I were starting from scratch, I
> might consider using SWIG because it gives you the
13 matches
Mail list logo