Re: [C++-sig] boost ref problem

2012-02-07 Thread Jim Bosch
On 02/06/2012 08:33 PM, Jay Riley wrote: I'm trying to wrap a C++ class into python. I need to pass an enum value by reference through a virtual function. I'm doing it like so (non relevant code omitted): class BasicRMLScreenWrap : public BasicRMLScreen{ public:

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

2012-02-07 Thread Jim Bosch
On 02/07/2012 01:35 AM, paulcmnt wrote: The Python C API has the `PyObject *PyType_Type` object, which is equivalent to `type` in the interpreter. If I want to define a metaclass in C++, how can I set `type` as one of its bases in Boost.Python? Also, what other things should I take into considera

Re: [C++-sig] How do I make correct wrappers to interfaces while using shared_ptrs?

2012-02-07 Thread Jim Bosch
On 02/05/2012 07:49 PM, Adam Preble wrote: Would using register_ptr_to_python explicitly and consistently instead of the online shared_ptr declaration potentially eliminate some side-effects? I cannot yet isolate why my real app crashes in python when it tries to do an eval into one of my wrappe