Re: [C++-sig] Boost.Python: wrapping classes instead of functions???

2009-09-11 Thread David Roy
ow if some of these additional info is useful... Thanks -David troy d. straszheim wrote: > > David Roy wrote: >> >> and the profile was back to 54.0 seconds!!! >> Please could someone help me understand what's the difference and the >> mechanism underlying tha

[C++-sig] Boost.Python: wrapping classes instead of functions???

2009-09-10 Thread David Roy
Hi, I'm facing a very strange behavior that I cannot manage to explane. I'm currently working on a project of re-implementing Python functions in C++ in order to improve performance and I'm then creating Python extensions thanks to Boost. I implemented quite a heavy function that calculates tange

[C++-sig] Calling function on object of unknown type

2009-07-20 Thread David Roy
Hi all, I'm extending C++ with Boost.Python. At some point I need to call a Python function on an object of unknown Python type. I found those 2 solutions, but they seem so simple that they make me wonder about the dangerosity of doing this (I'm a newbie to Boost.Python): static void test_func_a