[C++-sig] Help me to help you :-)

Roman Yakovenko roman.yakovenko at gmail.com
Sat Feb 25 16:26:36 CET 2006


Hi. I did not have time to review your use of pyplusplus, sorry. But I
did reviewed the code
you were trying to expose.

For your first question, how to empty list, try to use boost::python::slice

l = l[ slice(0,0) ]

I think this should work

About your access violation: I think you get it because of mutli-threading.
Python and boost.python are not multi-threaded. May be I missed
something, but I would go
to an other solution: use std::vector, fill it with data and return
it. boost.python has functionality that will help you to wrap such
vector.

Also I think, that you can change your design a little. Can you
implement the whole
functionality in pure, no boost.python, C++ and then to create 2 functions:
Both of them will return a vector of symbols. Can you do it?

Hope this was helpful. I will have much more time in the end of the next week.
( I live according to Jews calendar :-) )


Thanks

--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/



More information about the Cplusplus-sig mailing list