autowrap
autowrap copied to clipboard
[Feature] Preserve shared_ptrs for non-const-ref std::vector conversion
Preserves the old PyClass instances and their memory and allocates the difference to the new size. Also removes one copy, since it copies the data directly to the memory addresses of the old and new Python objects.
@hroest
@jpfeuffer this sounds good if that is the case we described, can you add a test to autowrap? also why does this add a ton of boost code?
Can we add a switch to enable or disable C++11
features? I don't want to break other users code when they use older build chains in their projects.
@uweschmitt Yes, I considered that already. Will do. @hroest I am not sure if it solves all our problems but it should be a) a bit more efficient due to the moves and b) a bit more of the data will be at the same place when moving back to the original list locations. I will think about a good test. And the new boost code is for make_shared, which requires boost's own move "module".
Oh, by the way, libcpp_move requires a fairly recent Cython. Are you okay with that?
Oh, by the way, libcpp_move requires a fairly recent Cython. Are you okay with that?
Yes, a minimal version requirement can be specified in setup.py
and thus upgrading autowrap
will not break this. The C-compiler setup on the target machine is out of our hands.