Re: [C++-sig] How to define a Python metaclass with Boost.Python?

2012-02-11 Thread Jim Bosch
On 02/11/2012 04:15 PM, Paul-Cristian Manta wrote: I don't think it's impossible to set a metaclass of another class with Boost.Python. The trick is actually pretty similar to the one above. >>> class Foo: ...pass ... >>> Foo = FooMeta(Foo.__name__, Foo.__bases__, dict(Foo.__dict__)) You

Re: [C++-sig] How to define a Python metaclass with Boost.Python?

2012-02-11 Thread Paul-Cristian Manta
> > > This is indeed a perfectly valid way to make a metaclass, and it should > definitely work to do the same thing in C++ using the C API and/or > Boost.Python. > > The trouble is using that metaclass as the type of a Boost.Python-wrapped > C++ class...that's what I think is basically impossible.

Re: [C++-sig] Crash at shutdown

2012-02-11 Thread Niall Douglas
On 10 Feb 2012 at 21:23, Jim Bosch wrote: > > when I execute Boost.Python export statement in C it adds some records in > > Boost.Python and Python interpreter. When C is unloaded from memory somehow > > these records are not being cleaned up. By the time we get to clean this > > records > > C is

Re: [C++-sig] boost::python handles boost::shared_ptr specially...

2012-02-11 Thread Neal Becker
Jim Bosch wrote: > On 02/06/2012 11:33 AM, Neal Becker wrote: >> Will std::shared_ptr just work also? > > Just tried the experiment, albeit with slightly old versions. > > As of gcc 4.4 (with -std=gnu++0x) and Boost 1.47, it looks like > Boost.Python doesn't even recognize std::shared_ptr as any