Re: [C++-sig] Python-overridable method taking const ref?

2009-02-04 Thread Roman Yakovenko
On Thu, Feb 5, 2009 at 4:56 AM, David Abrahams wrote: > > on Wed Feb 04 2009, Paul Melis wrote: > >> 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

Re: [C++-sig] Python-overridable method taking const ref?

2009-02-04 Thread David Abrahams
on Wed Feb 04 2009, Paul Melis wrote: > 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. > > struct CallbackWrap : Call

[C++-sig] Class scoped enum losing scope

2009-02-04 Thread Rao, Sumeeth
Hello I am a newbie in using boost python. I use boost python version 1.33.1, on linux x64 Fedora 9 2.6.26.3-29 kernel. Here is a problem I am facing: C++ code: class Foo{ public: typedef enum { TYPE_A, TYPE_B, TYPE_C }eType; }; class Bar { public: bool barf

Re: [C++-sig] Python-overridable method taking const ref?

2009-02-04 Thread Paul Melis
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 Boost Software License, Version 1.0. (See > // ac

Re: [C++-sig] Python-overridable method taking const ref?

2009-02-04 Thread Roman Yakovenko
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 Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://

Re: [C++-sig] Python-overridable method taking const ref?

2009-02-04 Thread Paul Melis
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 that takes a const reference to a refc

Re: [C++-sig] Python-overridable method taking const ref?

2009-02-04 Thread Roman Yakovenko
On Wed, Feb 4, 2009 at 8:49 PM, Paul Melis wrote: > 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: > > #

[C++-sig] Python-overridable method taking const ref?

2009-02-04 Thread Paul Melis
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

Re: [C++-sig] "extension class wrapper for base class has not been created yet" error message on Linux for a project that works fine on Windows

2009-02-04 Thread Renato Araujo
Hi, I got a error like this, I solved this fixing the order of the link flags, libboost_python need be the first library. BR On Wed, Feb 4, 2009 at 1:46 PM, Andras Pap wrote: > I am creating a base class "Base::Foo" in Foo.dll(so) and expose it in the > FooWrapper.pyd(so) module. Class "Deriv

[C++-sig] "extension class wrapper for base class has not been created yet" error message on Linux for a project that works fine on Windows

2009-02-04 Thread Andras Pap
I am creating a base class "Base::Foo" in Foo.dll(so) and expose it in the FooWrapper.pyd(so) module. Class "Derived::Bar" derives from Base::Foo and is in the Bar.dll(so) and exposed in the BarWrapper.pyd(so) module. On Windows the following works fine: Python 2.4.2 (#67, Sep 28 2005, 12:41:1