Re: [C++-sig] [Boost.Python v3] Features and Scope

2011-08-30 Thread Niall Douglas
On 30 Aug 2011 at 10:42, Jim Bosch wrote: > I agree with all of the above, and these could all be solved by my > proposal of having per-module registrations take precedence over gloal > registrations. Having a single optimal converter is clearly the best > solution when such a thing exists, an

Re: [C++-sig] Boost Python loss of values

2011-08-30 Thread Jim Bosch
On 08/30/2011 07:58 AM, Jay Riley wrote: Self is indeed a PyObject* this is a bit confusing I'm afraid my next piece of advice is to simplify this like crazy, and see if you can replicate the problem in a very minimal example. If you can get it small enough, I can take a look at the whole

Re: [C++-sig] [Boost.Python v3] Features and Scope

2011-08-30 Thread Jim Bosch
On 08/30/2011 04:04 AM, Stefan Seefeld wrote: On 08/30/2011 02:42 AM, Jim Bosch wrote: On 08/29/2011 09:41 AM, Stefan Seefeld wrote: On 08/28/2011 02:14 PM, Jim Bosch wrote: To solve it, I think you'd want anything registered by a specific module to appear both in that module's registry and t

Re: [C++-sig] sending a c++ class to a python function

2011-08-30 Thread Jim Bosch
On 08/30/2011 07:45 AM, Josh Stratton wrote: Oh, okay. So I can create a module... #include "scene.h" BOOST_PYTHON_MODULE(scene) { class_("Scene"); } and then import it (even though) in my python I normally don't import things I'm not creating. I'm assuming this is a boost-python thing t

Re: [C++-sig] [Boost.Python v3] Features and Scope

2011-08-30 Thread Jim Bosch
On 08/30/2011 01:26 AM, Hans Meine wrote: Am Dienstag, 30. August 2011, 08:42:53 schrieb Jim Bosch: I don't see how having a global registry makes things any worse from an ODR perspective. It seems like it's mostly just the same "where do templates get instantiated" problem that compilers and l

Re: [C++-sig] Boost Python loss of values

2011-08-30 Thread Jay Riley
Self is indeed a PyObject* this is a bit confusing > Date: Fri, 26 Aug 2011 13:00:11 -0700 > From: tallji...@gmail.com > To: cplusplus-sig@python.org > Subject: Re: [C++-sig] Boost Python loss of values > > On 08/26/2011 08:27 AM, Jay Riley wrote: > > Hi Jim, > > > > Thanks for the suggestion,

Re: [C++-sig] sending a c++ class to a python function

2011-08-30 Thread Josh Stratton
Oh, okay. So I can create a module... #include "scene.h" BOOST_PYTHON_MODULE(scene) { class_("Scene"); } and then import it (even though) in my python I normally don't import things I'm not creating. I'm assuming this is a boost-python thing to get the class into scope, which gets rid of th

Re: [C++-sig] [Boost.Python v3] Features and Scope

2011-08-30 Thread Stefan Seefeld
On 08/30/2011 02:42 AM, Jim Bosch wrote: > On 08/29/2011 09:41 AM, Stefan Seefeld wrote: >> On 08/28/2011 02:14 PM, Jim Bosch wrote: >>> >>> To solve it, I think you'd want anything registered by a specific >>> module to appear both in that module's registry and the global >>> registry, with the mo

Re: [C++-sig] [Boost.Python v3] Features and Scope

2011-08-30 Thread Hans Meine
Am Dienstag, 30. August 2011, 08:42:53 schrieb Jim Bosch: > I don't see how having a global registry makes things any worse from an > ODR perspective. It seems like it's mostly just the same "where do > templates get instantiated" problem that compilers and linkers always > have to deal with. The