Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#1231 vectors of shared pointers to const objects lose python type

open
nobody
python (258)
5
2012-12-21
2012-03-23
Anonymous
No

When return a vector of shared pointers to const objects in python, they are returned as SwigPyObject instances instead of the appropriate type.

Single shared pointers to const objects are returned correctly and so are vectors of shared pointers to non const objects.

The following is an example of the issue:
C++
std::vector<boost::shared_ptr<const ClassA> > someMethod();

SWIG Interface
%template (ExampleType) std::vector< boost::shared_ptr < const ClassA > > ;

Discussion


  • Anonymous
    2012-03-23

    Example cpp

     
    Attachments