Re: [C++-sig] Boost.Python is slow?

2009-07-12 Thread Kamal Mansouri
For something like this, it would be better to write a function that performs the operation on the million+ Points in C++ and expose that function to Python. This would be a better alternative to both using Boost.Python or wrapping it by hand. Kamal > From: cadc...@narod.ru > To: cplusplus-s

[C++-sig] Boost.Python and Boost.Any

2009-07-02 Thread Kamal Mansouri
Hello, I am currently working on a way to convert boost::any to/from Python/C++. So far the idea is that for any C++ type T exported to Python via Boost.Python, you also register a function that converts an instance of boost::any storing a value of type T to Python as well. In other words, if y

[C++-sig] Smart pointer, polymorphism issue

2009-03-17 Thread Kamal Mansouri
Hello, I have created a Python wrapper using a custom smart pointer that is defined in the following manner: class_>("Event", init<>()) .def("f", &Event::f, &EventWrapper::default_f). implicitely_convertible, Ptr>(); register_ptr_to_python>(); Now... when I subclass this in Python