swig/python problem: passing vector of objects.
bpeng at rice.edu
Sun Jun 20 08:59:01 CEST 2004
I have had success in using vector.i of SWIG to map between
However, the map of vector of objects fails:
c++: foo(vector<obj> )
python: a = obj()
Can anyone tell me
1. what exactly being passed to C++, a swig_pointer of a? Is there any
copy constructure invloved during parameter passing?
2. It would be best for me to pass pointers of objects, i.e., I would like
foo([a]) # python code
Is there any easy way to do it? (I do not know how to write SWIG maps.)
Many thanks in advance.
More information about the Python-list