Re: [C++-sig] Tips for exposing classes with own memory management model

2013-04-18 Thread Alex Leach
Hi, Thanks again for the fast response! On Thu, 18 Apr 2013 17:14:05 +0100, Jim Bosch wrote: You can't really register the types themselves. All you can do is register custom converters for them, i.e. You'll need to read the code and comments in the "converter" subdirectories of the B

Re: [C++-sig] Tips for exposing classes with own memory management model

2013-04-18 Thread Jim Bosch
On 04/18/2013 11:44 AM, Alex Leach wrote: Thank you for the quick response! On Thu, 18 Apr 2013 15:24:09 +0100, Jim Bosch wrote: If you go with writing your own PyTypeObject, you will indeed have a lot more control, but it will greatly limit how much Boost.Python you can use (no class_,

Re: [C++-sig] Tips for exposing classes with own memory management model

2013-04-18 Thread Alex Leach
Thank you for the quick response!On Thu, 18 Apr 2013 15:24:09 +0100, Jim Bosch wrote:If you go with writing your own PyTypeObject, you will indeed have a lot more control, but it will greatly limit how much Boost.Python you can use (no class_, for instance, at least), and you'll need to dive deep

Re: [C++-sig] Tips for exposing classes with own memory management model

2013-04-18 Thread Jim Bosch
On Apr 18, 2013 9:12 AM, "Alex Leach" wrote: > > Dear list, > > Apologies if this has been asked before, but I'm struggling to find anything strictly related.. > > Background > -- > > This library I'm trying to wrap uses its own memory management model, where almost every class derives fro

[C++-sig] Tips for exposing classes with own memory management model

2013-04-18 Thread Alex Leach
Dear list, Apologies if this has been asked before, but I'm struggling to find anything strictly related.. Background -- This library I'm trying to wrap uses its own memory management model, where almost every class derives from an object with loads of memory management-related m

Re: [C++-sig] question on boost.python exception mechanisms

2013-04-18 Thread Holger Joukl
Before trying out Niall's wealth of suggestions, just to fix up my own erroneous example: > From: Holger Joukl > A bit of a simplified example version using Boost's partial C++11 exception > support > would then be s.th. like: > > 0 $ cat dispatch_main_exception_map.cpp > // File: dispatch_main_e