Fix std::vector of const pointers
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11704 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
4b2ced5095
commit
132376bade
5 changed files with 67 additions and 2 deletions
|
|
@ -125,15 +125,16 @@ std::vector<std::string> vecStr(std::vector<std::string> v) {
|
|||
|
||||
%inline %{
|
||||
int *makeIntPtr(int v) { return new int(v); }
|
||||
const short *makeConstShortPtr(int v) { return new short(v); }
|
||||
double *makeDoublePtr(double v) { return new double(v); }
|
||||
int extractInt(int *p) { return *p; }
|
||||
short extractConstShort(const short *p) { return *p; }
|
||||
%}
|
||||
|
||||
%template(pyvector) std::vector<swig::SwigPtr_PyObject>;
|
||||
|
||||
namespace std {
|
||||
%template(ConstShortVector) vector<const short *>;
|
||||
// %template(ConstIntVector) vector<const int *>; // interferes with vector<int *>... see new testcase li_std_vector_ptr
|
||||
%template(ConstShortPtrVector) vector<const short *>;
|
||||
}
|
||||
|
||||
%inline %{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue